I was upgrading the application from 17 to 21 version where a!toJson works good in older one but throwing error in the newer one while giving record constant as values.
Help with this issue. Thanks in Advance.
Discussion posts and replies are publicly visible
Sorry That was wrong ss. This one is what I tried.
I would like to know the use case here. Is there any specific reason for converting the record object into JSON?
Try to cast the record type into the corresponding CDT type first.
I tried it and got the respective fields of record, But what we want and get in our older version includes attributes of record.
This is what we get in older versions.
This is the one I tried.
well, whats your use case here?
what do you need the attributes for
we are giving these whole as input for record type variable and to write values for Audit DS.
well, can you elaborate further?
Are you writing to database as text the json you got earlier from the tojson function ?
also, why would you need it for writing to DB ?
In general that's a pretty hacky way to get the fields - have you tried using the a!keys() function?
a!keys() was available in 21.4 version but in our environment it is unavailable (21.3 ).
If getting keys can resolve your issue, then you can get the keys by function getKeysFromDictionary available in Dictionary Manipulation plugin
© 2022 Appian. All rights reserved.