Rerurns [GlideRecord][Object].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2022 02:23 AM - edited ‎10-04-2022 03:24 AM
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2022 03:38 AM
line 29 is wrong.
what are you trying to achieve?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2022 04:31 AM
Hi,
Sorry, old screenshot.
Fixed but no value returned.
var user = this.getParameter('sysparm_id');
var department = user.getElement('department.id'); // RETURN VALUE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2022 05:54 AM
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?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2022 06:32 AM - edited ‎10-04-2022 06:32 AM
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,