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

line 29 is wrong.

what are you trying to achieve?

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

Hi,

Sorry, old screenshot.

Fixed but no value returned.

 

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

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

Hi,

the value you get from client script; what do you wish to perform on that?

that field on form is of what type and what value you wish to send to ajax function?

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

Hi,

Requirement:

I want to set up a department for the selected user.

(There is a team under a department, but everyone needs to create a process that returns the value of that department)

The field is of type Reference and refers to the sys_user table.

Each time a client configures a user in that field, it must set the department to which the person belongs.(onChange)

So I want to pass the user's sys id to the server side, but now it doesn't work.

 

Regards,