Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Importing Data into Custom Document Type View modes: 
User avatar
Member
Member
Armysniper89 - 5/24/2011 9:41:20 PM
   
Importing Data into Custom Document Type
I have a custom version of the Event document type that has a bunch of different fields. The reason I have these fields is due to the fact that we want to have Events important from an external site. The plan is to import daily, new events added to this external site into our Kentico site. Ideally I can run a SQL script to merge the values from one table into my custom Event document type. Will this work? I have read some responses to imports suggest using the API which I will if I have to but I would like to use SQL code to keep it on the back end. Second question, if I import through SQL, what is needed to get these Events to show up in the site?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 5/25/2011 2:50:46 AM
   
RE:Importing Data into Custom Document Type
Hello,

We really don't recommend to use only SQL commands for importing documents, since it may cause inconsistencies. Events are documents and if they are under workflow then you would need to take into account that some events won't be directly published. You would need to update correctly the CMS_Document, CMS_Tree and CONTENT_<your document type> table together with all references and create a valid GUID. For some examples of our API please check our documentation about handling documents under workflow and without.

Best regards,
Boris Pocatko