Generate random ID when inserted data from an entity

Hello everyone,   As we know, in Mendix if we creating a data from an entity, it will generate an incremental pattern id as below   After doing pentest, it shows problem like below Ticket `guid` from `35465847065813675` to `35465847065813397` `TicketNo` from `ALR-2024-0013` to `ALR-2024-7777` `TicketManagement.TLogManualTicket_TTicket` from `35465847065813675` to `35465847065813397` Log Description from `Ticket Accepted By itsec_test_01` to `Ticket Accepted By itsec_test_02-steal-steal` `LogBy` from `itsec_test_01` to `itsec_test_02` The changes also impact the actual database which can be shown on the admin panel in the web version of the application.   By this case, I want to implement a random guid for the id. But when I try inject random id to data, it shows blank data like below   From this case, is it possible to implement random guid as the id in mendix? If yes, please explain step by step, and if no please explain the reason.   Thank you
1 answers

The id is something that is generated and maintained by the platform, so you can't change it.


If you want to add an additional GUID attribute then you could use the RandomHash action in the Community Commons module to generate the random value, and maybe call this in an After Create event to set the value in your new attribute when the new object is first created.


I hope this helps.