Auto Poupulate the asset assigned to the user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:04 AM
Hi,
I have the catalog form where there are 2 reference fields.
1. user_to_be_released - reference of sys_user table
2. computer_name - reference of alm_hardware table
Now i need to auto populate the asset assigned to the user( "user_to_be_release field") in computer_name field and below are the CS and script include which i have written. But i didnt get any values returned in computer_name field.
Can you please help me with this and is there any reference qualifier needs to added in computer_name field? Please give your suggestions, since i am new to scripting.
Client Script - written on computer_name and type is onChange
Script Include - client callable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:08 AM
Hi,
Replace the bewlow line in script include
var req = this.getParameter('sysparm_user_to_be_released');
To
var req = this.getParameter('sysparm_req');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:12 AM
Can you show the latest version of the script you are using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:16 AM
@Anurag Tripathi below is my script include and catalog client script.
Script Include:
Client Script:
Thanks!