Discussion

Ask a Question
Back to All

Removing/unlinking requesters from a request via javascript or other automation rule

I am wondering if there is a way, using automation rules in javascript to remove existing requesters from a Request? The snippet below works to assign a requester to a request, but it appends the requester to those already on the request, it doesn't replace the existing list of requesters.
Thanks,

//assign requester
return {
command: "targetprocess:UpdateResource",
payload: {
resourceType: args.ResourceType,
resourceId: args.ResourceId,
fields: {
"Requesters": [requesters[0]]
}
}
}