Glide AJAX not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2018 12:54 AM
Hello Experts,
My goal is to have a string field on incident form and when the form loads, it should get populated with CI details ( like name , manufacturer , asset tag etc ) based on what is selected under configuration item.
To achieve this, I created onload client script, and using glideajax to interact with script include which returns the data from that specific configuration item, however I am getting null value as a result. Can someone please help ?
Below is the client script
script include
Output 😞
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 01:07 PM
Did you find a solution to your issue? If yes, please remember to tag the correct answer and any that were helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2018 01:30 PM
Are you getting your gs.log ?
few tips for debugging:
1. check your connection between client script and Server side
add gs.log as you did but remember second parameter is a string
comment out the rest of function
2. if #1 ok, move to check parameters
add gs.log after this.getParameter
3. if #2 ok, change your gr.get(SYSYID) to
gr.addQuery('sys_id',SYSID);
gr.query();
if(gr.next()){
//your code
// result = ???
}
return result;
Sometime the "get " doesn't work as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2020 10:46 PM
Not sure if any of the solutions worked. But another thing to ensure is that you need to give the execute access to your client callable script include by creating an ACL for 'client_callable_script_include'. There you need to provide relevant roles to it about the users who are going to call your glide ajax function.