Problem: When applying a!toJson on a record type, record fields of type user will be converted to JSON objects. When casting the JSON back to record type, it fails to convert the user object (dictionary) to User type with error: CastInvalidCould not cast from Dictionary to User.
Example
Changing the record field type from user to text would eliminate issues in JSON conversion, but it takes away the ability to use record security rules by user fields. Another workaround is to flatten out all record fields that are of type user and convert it to the username string. Does Appian have a solution for this? Peter Lewis
Discussion posts and replies are publicly visible
I can replicate this.
In general, I think that tying external data representation to internal becomes a problem on the long run. In case you need to change your internal structure, other system might break.
Our use case is a one-way transfer of data from an Appian cloud to a customer Appian side. Both systems are on the same codebase and database schema structure and are active at the same time, writing to the same tables. The data must merge on the customer Appian side, facilitated by using GUIDs as primary keys.
OK. Then separate data-transfer-objects don't make much sense.