- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 08:37 AM
I have a script include that I am trying to call to in a scheduled job. The API Name field on the script include is 'global.CheckAssetWarranty'. However, in the script itself, the function is defined as 'function checkAssetWarranty()'. My question is, when I am trying to call the Script Include in the Scheduled Job, should I be referencing the global.CheckAssetWarranty, or the checkAssetWarranty()?
Thanks!
Brad
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 08:48 AM
Hi,
Below thread answers your query. Please review the same:
Call script from the Scheduled Job
You can also refer the OOB Scheduled Job "Autoclose Incidents" which calls the Business Rule "incident autoclose" in the scheduled Job. Below is the link for the OOB Scheduled Job:
Replace "instance" with your Instance Name.
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 08:48 AM
Hi,
Below thread answers your query. Please review the same:
Call script from the Scheduled Job
You can also refer the OOB Scheduled Job "Autoclose Incidents" which calls the Business Rule "incident autoclose" in the scheduled Job. Below is the link for the OOB Scheduled Job:
Replace "instance" with your Instance Name.
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 12:38 PM
While not exact, this article helped me figure out my problem. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2017 08:56 AM
Hi,
I don't think you need to call with global prefix, despite that being the API name.
Something like this in sched job.
var test = CheckAssetWarranty.myFunction(param1, param2);
Gavin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 11:21 AM
Hi,
If your query is Resolved, Please mark the answer as correct so that the thread can be removed from the Unanswered list.
Regards,
Shloke
Regards,
Shloke