Hi Community,
How can I create a JSON with the object ID by using the %Object:$toJSON API?
I have the following piece of code bellow where I create an object reference, create a %Object instance from %fromObject and them I am creating the JSON from $toJSON, but it does not expose the %ID (object id). How is the best approach to create a JSON with the respectives object IDs?
Try{Set ##classThe outcome is:
Write tObj.$toJSON()
{"Age":28,"MaritalStatus":"Casada","Name":"Emilia de Souza","Sex":"F"}I am expecting this:
{"ID":5,"Age":28,"MaritalStatus":"Casada","Name":"Emilia de Souza","Sex":"F"}


