Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Getting ID of current open Document Type View modes: 
User avatar
Member
Member
mcamenzuli-accreda - 1/14/2010 4:28:53 AM
   
Getting ID of current open Document Type
Hello,

Is it possible to get the ID of the current open document type when open in the form tab and use it in an SQL query?

I would like to query a field in the actual document according to the currently open document type.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 1/14/2010 7:25:55 AM
   
RE:Getting ID of current open Document Type
Hello,

could you please tell me how exactly you would like to use the ID of current document type?

You could use the context macro on Page tab, Design tab or Properties tab but on Form tab it will not work. But the form tab relates to one document type so I am not sure why you could need the dynamic value instead of static ID.

You may know the ID of document type either by API () or take a look to the CMS_Class table in Kentico CMS database, find the results for your ClassName and see the ClassID.

Best regards,
Helena Grulichova