I have question about restore document in recycle bin.

Mr.Paichayon Chaiteerayanon asked on February 11, 2016 06:14

Dear sir, When i create new document and i test delete document.i see this document in Recycle bin at Pages. After that i restore this file.i see this document at root site page that OK but i see properties of document at autonumber be changed.Have properties are generate by kentico that not changed after restore? Example: I create page type "Book" and kentico generate "BookID" is autonumber. and I create Book.i see BookID is 1.After that i delete and restore. i see BookID is 2 that not ok in my system. Thank you.

Recent Answers


Brenden Kehren answered on February 11, 2016 07:12

You'd have to modify the base code to change this. If you're referencing the ID of your custom page type, you might want to change what you're looking at. You might look at the NodeID or the NodeGUID instead because a page type is only added in the content tree.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 12, 2016 14:23

Hi,

As Brenden pointed out you should use the unique GUIDs. Using ID's could potentially break your custom code if you create a new object before you restore the item Kentico will automatically use the next ID.

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Mr.Paichayon Chaiteerayanon answered on February 13, 2016 04:54

Thank you

0 votesVote for this answer Mark as a Correct answer

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