By selecting the Opened for I want to Auto populate Contact number by using the Sciptinclude
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 11:03 PM
Hi,
i have used the below script with contact number modifications but it is not working as expected. hence contact number is not populating
please find the below mentioned Screenshots for the same.
Please help me out if i can do any modifications in the script.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 01:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 01:06 AM
Please add those 2 lines added by @Voona Rohila in ur script include after line 18. That is the most probable cause.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 01:19 AM
@kranthi2 please put alert before the if statement as below,
alert("Contact in CS "+contact_num);
Also add logs in your script include before return statement.
gs.log("Contact from SI " +conatct_num, 'contact');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 11:15 PM
Hi @kranthi2
You can simply use Auto Populate Feature, You can achieve your requirement with No Code.
Refer Below Link:
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 11:17 PM
Yes i have already tried but when ever user is logged as a end user then contact number is not populating hence i have use the scriptinclude
please help me out the issue in the script please.