Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Create ServiceNow Ticket Fails with user.jobcodedesc

Huddos
Regular Contributor
Regular Contributor

Hi,

I can successfully create a ticket in ServiceNow however when I add this code \\\\nPosition Title:'+user.jobcodedesc+'. to the request_details the ticket creates but is populated with the REST code rather than correct details.

Ticket created and is populated correctly.

\\\\nLine Leader First name: '+userManager.firstname+'.\\\\nLine Leader Last name: '+userManager.lastname+'. \\\\nStart Date (Join Date):'+ user.startdate +'. \\\\nEnd Date (Max Position End Date): NA'

Ticket created and is populated incorrectly.

\\\\nLine Leader First name: '+userManager.firstname+'.\\\\nLine Leader Last name: '+userManager.lastname+'. \\\\nPosition Title:'+user.jobcodedesc+'.\\\\nStart Date (Join Date):'+ user.startdate +'. \\\\nEnd Date (Max Position End Date): NA'

The user I'm testing with has jobcodedesc populated. 

***** Update: The user did not have a manager and hence why it failed and was not the jobcodedesc in the end. For null values do I need to change each attribute to test for null e.g 

\\\\nLine Leader First name: '+${(userManager.lastname == null)?'No LineLeader Assigned':userManager.lastname}+'

 

thanks

 

TIA

 

2 REPLIES 2

rushikeshvartak
All-Star
All-Star


\\\\nLine Leader First name: '+userManager?.firstname+'.\\\\nLine Leader Last name: '+userManager?.lastname+'. \\\\nPosition Title:'+user?.jobcodedesc+'.\\\\nStart Date (Join Date):'+ user?.startdate +'. \\\\nEnd Date (Max Position End Date): NA'


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Huddos
Regular Contributor
Regular Contributor

Thanks Rushikesh