Guid field on online form

lawrence whittemore asked on December 21, 2021 20:33

how do we get a guid to autogenerate on a bizform?

Recent Answers


David te Kloese answered on December 21, 2021 23:25

As there is out of the box macro that does this the cleanest that does give you a random GUID would be to just create a custom macro and handle it in code.

Depending on how/where you need it you could also just hide the field, but create it directly on SQL level (as a constraint) completely bypassing the insert through the form. But Kentico doesn't know about it, and you can't easily deploy it trough common deployments.

And then there is the Global Event Handlers, or just in code where you use it you could do a check and update if null first...

0 votesVote for this answer Mark as a Correct answer

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