thiskeyword can be used in a class to deserialize JSON string to udv.
But it can not be used when serializing udv to JSON string.
To create classes which are able to convert its data between udv and JSON strings the
thiskeyword must be working for both SalJSON functions.
1) ToJSON -> this
This fails. It tries to create a JSON string from the udv data.
2) ToJSON -> workaround.
It will first make a copy of the udv into a local variable. This local variable is then passed to the SalJSON function which works.
3) FromJSON -> this
This works ok. The this keyword can be used.
This issue has been registered as Ticket 3752520
TD defect number:
TD-24026: SalJSONSerializeUDV() fails in returning false when using the 'this' keyword for the sObjectName parameter of the function