what macro might do the trick?

gayan belousova asked on February 11, 2019 11:01

Using Kentico 11 (Portal engine)

I would like to add a GUID field to one of my pagetypes. I would like the system to generate the guid (I assume this is done via a macro?). Any idea what macro might do the trick?

Any help is appreciated.

Recent Answers


Dražen Janjiček answered on February 11, 2019 11:25

Funny, the exact same question was posted and answered here months ago:

https://stackoverflow.com/questions/51272021/kentico-11-system-generated-guid

@Kentico - does your bot check work? :-)

0 votesVote for this answer Mark as a Correct answer

Suneel Jhangiani answered on February 11, 2019 13:05

Just to add to the answers already provided on Stack Overflow:

A third method would be to create a Global Event Handler that would check the data before insert and if the GUID is null / empty, set it to a new value.

0 votesVote for this answer Mark as a Correct answer

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