Set custom field in Javascript action

Example: Set custom field in Javascript action

Example to update a Number type Custom field

19441944

Text

19541954

Date

12321232

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"
    }
  }
};