preloader-matrix

Alfasith

GUID in AX 2012 / D365

//< What is GUID>

// GUID 16 bit large range of alphanumeric similar to RecID to treat as primary key of a table.

static void CreateGUIDInAX(Args _args)

{

str 60 strGuid;

;

info(Winapi::createGUID());         // Creates GUID and removes the braces

info(guid2str(newGuid()));           // Creates GUID with braces

//NOTE: GUID is not a string so we needs to convert GUID to str for using…

}

Output:

C2B4FEBF-2393-43BB-9EA5-B173B907CA2A

{BAD14349-5837-4AC3-9B9B-9D6FB0F86BEC}

note: Your output and mine needs to be same.

 

Regards.

Leave a Reply

Your email address will not be published.