Autopopulate a field on the incident form from the user table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 12:38 PM
I've watched countless YouTube videos, read numerous Community articles and still I cant seem to populate a field from the User table on the incident form based on the caller_id. I created a dictionary entry called T-ID and made it a reference and then created various scripts including Client scripts and script includes and cant seem to get it to work. I even tried to use the user's email in case we accidentally set up the dictionary entry wrong and I cant get that to populate either (this was previously configured for us).
Trying to understand if I missed a step in the process. Any help would be appreciated! Here is a very rudimentary outline of what I did:
Step 1. Created a dictionary entry for T-ID (reference to the sys_user table)
Step 2: Added the field to the incident form
Step 3: Created a client script (tried so many versions at this point that writing them out seems unreasonable) to pull caller_id (field name for us is contact) and return the T-ID (u_t_id)
Step 4: Create a Script Includes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 07:59 PM
what should T-ID hold?
Should it hold reference to user table or it should hold email or username of the caller?
Based on that your logic will be there
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 08:27 AM
Hello @DEESN ,
I will suggest use 'string' type field. instead of 'string (full utf-8)' for T-ID field. and can you please what is value you are returning from script include in you client script. Can you show me the log you are getting. Screenshot will be helpful.
Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.
Regards,
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 06:53 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 06:28 AM - edited 01-09-2024 06:31 AM
Hi @DEESN ,
from the above screenshot shared by you i can see the name of the script include mentioned in ur client script at line no 8 is wrong can u correct that name it will get converted to italic format. Then check plz. Also as mentioned by @Tai Vu make line 7 in ur script include to gs.log instead of ga.log
Thanks,
Danish