Unable to get and set values to a custom field via Zendesk App | Community
Skip to main content

Unable to get and set values to a custom field via Zendesk App

  • March 12, 2022
  • 1 reply
  • 0 views

Blog

Following is my code snippet. 

 

const getAccountNameFunc = async () => {

const myData = client.get('ticket.customField:custom_field_4590824941204')
client.set('ticket.customField:custom_field_4731199018772', myData['ticket.customField:custom_field_4590824941204'])

}

Am I doing something wrong ? I think the client.get returns an object. But I am not able to use the data received to set the value of another field. 

1 reply

Ola11
  • March 15, 2022

client.get returns a promise object, so you can't just set it to a variable https://developer.zendesk.com/api-reference/apps/apps-core-api/client_api/#clientgetpaths