Custom document how to get DocumentID

Witchayanin Maythangkul asked on September 7, 2014 09:28

I have create a custom document and I need to get DocumentID to join table CMS_Document. I don't know what table mapping with My custom document and CMS_Document.

Correct Answer

Brenden Kehren answered on September 8, 2014 06:01

So does your custom query need to join to some other database or table that isn't part of the standard query? You can use a regular repeater, set the document type to your custom doc type and display the data. By default the data being returned will have all the node, document and custom doc type fields.

If you want, run thes same SQL Query to look at the data returned as if you were to use the standard Repeater.

SELECT *
FROM view_yourcustom_documenttype_joined
1 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on September 7, 2014 21:05

You will only get the DocumentID when the doc type is used to create a page. You might try to explain a bit more what you are trying to accomplish aside from a join.

0 votesVote for this answer Mark as a Correct answer

Witchayanin Maythangkul answered on September 8, 2014 05:30

I'll explain you 1.Create custom document type in kentico 2.Create a custom webpart 3.Create custom query and bind to repeater in my custom webpart 4.But when I query I try to get DocuemntID but my custom document type not have a DocumentID 5.I want to use DocumentID NodeOrder and Culture to my query to bind repeater

0 votesVote for this answer Mark as a Correct answer

Witchayanin Maythangkul answered on September 8, 2014 07:15

Thank you very much BRENDEN KEHREN .

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.