Rerurns [GlideRecord][Object].

Mi1
Tera Contributor

Hi,
I want to pass the sys id I got in the client to Script Incudes.
But 'getParameter' returns [Object GlideRecord].

How can I return sys id?

Regards,

13 REPLIES 13

Mi1
Tera Contributor

HI,A value is returned.

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

your both the scripts are fine.

I didn't get what's your challenge/issue

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi,

My problem is that the script include doesn't return a value.

Currently returns 'Null' to the client.

Since [Object GlideRecord] is returned on line 28, processing after line 29 doesn't work.

Regards,

HI,

 

Can you verify your variable at line 28 and 29 are correct.

 

Regards,

Vaibhav

Mi1
Tera Contributor

Hi,

Sorry, old screenshot.

Fixed but no value returned.

 

var user = this.getParameter('sysparm_id');

var department = user.getElement('department.id');   // RETURN VALUE