Set custom field in Javascript action
Example: Set custom field in Javascript action
Example to update a Number type Custom field
![ex2.png 1944](https://files.readme.io/72dba6d-ex2.png)
Text
![ex3.png 1954](https://files.readme.io/fd6a66e-ex3.png)
Date
![image.png 1232](https://files.readme.io/5778cea-image.png)
URL
The URL custom field consists of two fields - the URL itself and the label.
return {
command: "targetprocess:UpdateResource",
payload: {
resourceType: args.ResourceType,
resourceId: args.ResourceId,
fields: {
"Url cf": { url: "https://link.com/v1", label: "Label name" } }
}
};
With space in the name
In case you have a custom field that consists of several words here is an example for updating a field with space in the name
return {
command: "targetprocess:UpdateResource",
payload: {
resourceType: args.ResourceType,
resourceId: args.ResourceId,
fields: {
"Several Words": "value"
}
}
};
Updated over 1 year ago