- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
I have created a client-callable Script Include and I'm trying to call it from a client-side UI Action. However, the Script Include is not being triggered when I execute the UI Action. I'm attaching the Script Include code, UI Action code, and screenshots. Please help me fix the issue.
script include:
code:
code:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi @Praju_123 ,
update your script include
var BotaoDeletar = Class.create();
BotaoDeletar.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
testing: function() {
return 25;
}, // just for testing purpose
type: 'BotaoDeletar'
});
you have to use global.AbstractAjaxProcessor since it's not in global scope
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Your syntax for script include is wrong.
Since your script include is in scoped app system automatically adds global keyword
Seems you copied the script and forgot to update that
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
Tuesday
Hi @Praju_123 ,
update your script include
var BotaoDeletar = Class.create();
BotaoDeletar.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
testing: function() {
return 25;
}, // just for testing purpose
type: 'BotaoDeletar'
});
you have to use global.AbstractAjaxProcessor since it's not in global scope
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Your syntax for script include is wrong.
Since your script include is in scoped app system automatically adds global keyword
Seems you copied the script and forgot to update that
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
Wednesday
Hi @Praju_123 ,
It seems like you are calling the different script include in glideAjax.
In Script Include API Name it very strage like 'x_icpa_cargo_for_().YOURSCRIPTINLCUDENAME' or 0 in place or () not sure.
but in your glideAjax function you are calling 'x_icpa_cargo_for_0.YOURSCRIPTINCLUDENAME'
Update your script include to
=Object.extendsObject(global.AbstractAjaxProcessor, {
Maybe you can check the what is short for your application scope "Cargo-Formal Claim" then copy the name in API Name from script include and add to glideAjax. Try out on bg script first. It will show if that function is getting called or not.
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!