Basic App functionality with custom fields | Community
Skip to main content

Basic App functionality with custom fields

  • August 12, 2021
  • 2 replies
  • 0 views

Raven11

Hello!

I'm using a basic tutorial from the site that looks like this:

var client = ZAFClient.init();
client.invoke('resize', { width: '100%', height: '200px' });
client.get('ticket.subject').then(
function(data) {
var z_subject = data['ticket.subject'];
console.log('Ticket Subject is ' + z_subject);

This prints the subject line to the console no problem.

But what I want to do is something like this:


var client = ZAFClient.init();
client.invoke('resize', { width: '100%', height: '200px' });
client.get('ticket.custom_field_12312321').then(
function(data) {
var zFieldValue = data['ticket.custom_field_12312321'];
console.log('The Field Value is ' + zFieldValue);

I want to get to a custom field value to display just like the subject displays and I can't figure out the right syntax.

Thanks in advance!

2 replies

Raven11
  • Author
  • August 13, 2021

found it in another post:

ticket.customField:custom_field_360034719351


Nicole17
  • October 23, 2021

Thanks for coming back and sharing that for other users, Raven!