Script Include call is not working from SOW

AnnuK
Tera Contributor

I have a client script calling script include to populate some data in form. 

The client script is working in Classic UI but not working from SOW. 

 

I have updated Desktop Type as "ALL"

I tried SOW view also. 

 

I tested that Script include call is not working from SOW. 

How to solve this..?

 

Other client scripts that have no script include call are working in SOW without update any view. View is Global.

Does Script Include work from SOW by 

2 ACCEPTED SOLUTIONS

@AnnuK 

so what debugging did you perform in your client script.

Did you check if logs came? any browser console error when the onchange runs

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Hello @AnnuK 

I have rebuilt your code. Please verify the screenshots below. Also, please cross-check the yellow highlighted area in your Client Script and Script include.

RushiSavarkar_0-1740735677619.png

Script Include

RushiSavarkar_1-1740735863912.png

1. In the script include, you will have to define "ID" variable as this.getParameter("sysparm_id");

2. The value of ID should be your Configuration Item.

3. Make sure cmdb_rel_ci is giving you the expected result with harcoded values before running the script

4. Isolate Script check box should be true

Result:

RushiSavarkar_3-1740736229541.png

 

RushiSavarkar_2-1740736142193.png

 

If my response helped you, please accept the solution and mark it as helpful.
Thank You!

View solution in original post

12 REPLIES 12

ok, you have mentioned it works in SOW. But for me, pls check my code, it does not work in SOW.

Hello @AnnuK 

I have rebuilt your code. Please verify the screenshots below. Also, please cross-check the yellow highlighted area in your Client Script and Script include.

RushiSavarkar_0-1740735677619.png

Script Include

RushiSavarkar_1-1740735863912.png

1. In the script include, you will have to define "ID" variable as this.getParameter("sysparm_id");

2. The value of ID should be your Configuration Item.

3. Make sure cmdb_rel_ci is giving you the expected result with harcoded values before running the script

4. Isolate Script check box should be true

Result:

RushiSavarkar_3-1740736229541.png

 

RushiSavarkar_2-1740736142193.png

 

If my response helped you, please accept the solution and mark it as helpful.
Thank You!

Thank you so much. I have fixed the issue.