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.

Location populating as object Glide Record

Simran321
Tera Expert

Hi there,

Can anyone help with the code?

 

I am trying to Orientation Location which is reference field to cmn
_location table. 

 

Simran321_0-1729038052188.png

 

1 ACCEPTED SOLUTION
17 REPLIES 17

Gangadhar Ravi
Giga Sage

@Simran321 are you trying to set "remote" as location ? what is the issue ?

Yes, I am trying to add Remote as Location if worker is contingent. Remote is a location on Location table @Gangadhar Ravi 

Bert_c1
Kilo Patron

Try 'if (orientationLocation.next()) {' before line 8 and add '}' after line 14. seems line 11 above should be:

current.u_orientation_location = orientationLocation,sys_id.toString();

for a reference field named 'u_current_location'.

 

good luck debugging your business rule script. 

Kenny Caldwell
ServiceNow Employee
ServiceNow Employee

Add orientationLocation.next() after orientationLocation.query().