escape
def escape = {val ->
if (val == null) {
return null

}
return JsonOutput.toJson(val)
If val is null, returns null. Otherwise, transforms object val into a JSON string and returns it.
Example
"svmx_test_field": "escape(SVMXC__Test_Field__c)"
Sample Transform
Original Fields
Transformed Fields
Name
Value
Name
Value
SVMXC__Test_Field__c
['num_field': 111, 'str_field':'str', 'bool_val': true]
svmx_test_field
'{"num_field":111,"str_field":"str","bool_val":true}'
For more information:
concat
ifelse
Was this helpful?