Developer forum

Forum » CMS - Standard features » Generate GUID for Item type records

Generate GUID for Item type records

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is there any way I can add a hidden field on an ItemType automatically generating a GUID every time a new Item is saved?

I have 2 separate ItemTypes that are used together in a list where I need to apply a filter. Using the ID of the item for the filter, is not enough since the ID can be found in both ItemTypes.

Thank you,
Adrian

 


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply
This post has been marked as an answer

Nevermind. I have figured it out.

I can create a hidden field and use @Code(System.Guid.NewGuid()) to generate the Guid on save.

Adrian

Votes for this answer: 1

 

You must be logged in to post in the forum