We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

can we call script include in scoped application from schedule job in global scope

NegiSNOW
Tera Contributor

can we call script include in scoped application from schedule job in global scope ?

2 ACCEPTED SOLUTIONS

abirakundu23
Giga Sage

Hi @NegiSNOW ,
This can be possible but depend upon how script include is configured.

1. If it is Accessible form - "This Application Scope Only" then it can't be called directly from Global Schedule Job. Attached screenshot as your references.

abirakundu23_0-1783135485890.png

2. You need to change script include Accessible form - "All Application Scope " then it can be called directly from Global Schedule Job. Attached screenshot as your references.

abirakundu23_2-1783135778413.png

 

Recommended approach - As script include in scoped application call schedule job from scop application instead of Global Application.

Please mark helpful & correct answer if it's worthy for you.

View solution in original post

Nishant8
Tera Sage

Hello @NegiSNOW , Yes, you can do that. Take care of the followings:

 - Accessible from is selected as "All application scopes"

- While calling the scoped Script Include, include application name before it

- Calling this code for the first time may trigger a Cross-Scope Access restriction. If triggered, accept the status of this generated tracking record is set to allowed.

 

You can refer following threads for the examples:
https://www.servicenow.com/community/developer-forum/how-to-call-a-scoped-script-include-from-global...

https://www.servicenow.com/community/itsm-forum/how-can-to-call-a-script-include-in-scoped-applicati...

 

Regards,

Nishant

View solution in original post

4 REPLIES 4

dimi_
Tera Expert

Absolutely, but you need to make sure you have configured the "accessible from" field in script include. 


CSA | CAD | DF | DISCO | ITIL4

NegiSNOW
Tera Contributor

Can you give me example of such cases 

abirakundu23
Giga Sage

Hi @NegiSNOW ,
This can be possible but depend upon how script include is configured.

1. If it is Accessible form - "This Application Scope Only" then it can't be called directly from Global Schedule Job. Attached screenshot as your references.

abirakundu23_0-1783135485890.png

2. You need to change script include Accessible form - "All Application Scope " then it can be called directly from Global Schedule Job. Attached screenshot as your references.

abirakundu23_2-1783135778413.png

 

Recommended approach - As script include in scoped application call schedule job from scop application instead of Global Application.

Please mark helpful & correct answer if it's worthy for you.

Nishant8
Tera Sage

Hello @NegiSNOW , Yes, you can do that. Take care of the followings:

 - Accessible from is selected as "All application scopes"

- While calling the scoped Script Include, include application name before it

- Calling this code for the first time may trigger a Cross-Scope Access restriction. If triggered, accept the status of this generated tracking record is set to allowed.

 

You can refer following threads for the examples:
https://www.servicenow.com/community/developer-forum/how-to-call-a-scoped-script-include-from-global...

https://www.servicenow.com/community/itsm-forum/how-can-to-call-a-script-include-in-scoped-applicati...

 

Regards,

Nishant