trying to change value:
COI_D_Documents.lesseenumber=11111
this seems to be the correct solution but..
a!localVariables( local!cdt:ri!coi ,local!fld: "[{" &""""& ri!field & """" & ":" & ri!valuesForTheField &"}]" ,local!json:a!fromJson(local!fld) ,updatecdt(cdt: cons!COI_RT_Document,fieldsAndValues:{local!json}) )
But i cant get updateCDT to work.
Discussion posts and replies are publicly visible
The updatecdt plugin function works by providing the existing CDT value as the first parameter. However, in your expression above, you provided a reference to a constant. Aren't you actually trying to update ri!coi?
Yes, that was the 4th try at doing the updateCDT
So just to confirm - does this work then?
a!localVariables( local!fld: "[{" &""""& ri!field & """" & ":" & ri!valuesForTheField &"}]", local!json:a!fromJson(local!fld), updatecdt(ri!coi,local!json) )
no,
Expression evaluation error at function 'updatecdt' [line 16]: Invalid dictionary
Maybe the JSON ?
Ah I think you don't need the brackets [] around your JSON at the top. The updatecdt is expecting a single dictionary, not a list of dictionary. At least once I took those out it worked for me:
You Rock, Thank you