Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to write field map for specific caller in integration

Sayali_9822
Tera Contributor

I wrote one field map for mapping a specific caller as a caller for another organization, but it's not reflecting their side. I attached a screenshot below. Given sys_id is the user's sysid. Can anyone help with this?

 

Sayali_9822_0-1726550030731.png

 

Thanks in advance!!!

2 ACCEPTED SOLUTIONS

Eshwar Reddy
Kilo Sage

@Sayali_9822 

try using on Before script

if (action == 'insert' && !target.caller_id) {

 target.caller = 'sysId of the caller you want'

}

 

 

View solution in original post

@Sayali_9822 
Sure
Use below code in same on before script

target.sys_created_on = new GlideDateTime();

Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

4 REPLIES 4

Eshwar Reddy
Kilo Sage

@Sayali_9822 

try using on Before script

if (action == 'insert' && !target.caller_id) {

 target.caller = 'sysId of the caller you want'

}

 

 

It worked for me...

 

Thank you very much!!!😊

one more thing I need, I want to map the created date as the current date on the incident 'created' field map. How we can map that?

@Sayali_9822 
Sure
Use below code in same on before script

target.sys_created_on = new GlideDateTime();

Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution