Can we call script include from background script.
This content was last updated in 2023. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 03:51 AM
Script Include
var Test = Class.create();
Test = Object.extendsObject(global.AbstractAjaxProcessor, {
type: 'Test',
autoMap: function(current) {
}
});
Background Script
var update = new Test();
update.autoMap(current);
I am trying this in Background Script but it is not working.
Can anyone pls help me on this as I am doing this activity for the first time.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:02 AM
Hi @aagman4 ,
Yes you can call script include in background script:
new ScriptIncludeName().functionName();
Please mark helpful if it helped you.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 05:07 AM
Hi @aagman4
If you are passing and current value in function then use:
var gr= new GlideRecord("table name");
var ga=gr.getValue('field name whose value required');
new ScriptIncludeName().functionName(ga);
Please mark helpful if it helped you.
Regards,