Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Create ServiceNow Ticket Fails with user.jobcodedesc

Huddos
New Contributor III
New Contributor III

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 you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Huddos
New Contributor III
New Contributor III

Thanks Rushikesh