need help with scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18 hours ago
I am trying to auto-populate names in my service catalog record producer. Pulling from the client table to the appt table that I created. I am not using the sn appt table. I have created a catalog UI policy when a change occurs, and Script include for the client calling and a Script for the catalog and created a new ACL. I am not the best at the scripting and leaned on SN chat gpt but it is not populating. Can someone help. Have I made this too restrictive?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15 hours ago
Hi @cj10121,
please share the configuration of the script include, not only the code but the whole record please.
Is it client callable (glide ajax callable) true? Is it allowed in all scopes as it seems that you have a custom app, also is your custom app accessible from other scopes or your configurations are all in the same scope?
Add gs.info() to your script include to see if it triggered, ideally to the beginning, middle and the end, to see what happens with the code..
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15 hours ago
You should add some gs.info lines to the Script Include and alert(client.first_name) to the Client Script to see how far it is getting. If these logs include values used in the script you'll see where it is going wrong. Your screen shots don't show the actual field names on either table so confirm those are all exactly what is used in each script (case and space sensitive). Try using GlideRecord in place of GlideRecordSecure, and in place of your return use:
return JSON.stringify(response);