Has anyone tried getting the Scriptloader working on Service Portal?

Swarup Roy
Kilo Expert

Hi,

I'am using Scriptloader API in one of my on-change catalog client script (i.e London), however when this Catalog Item is accessed over the portal i'am getting the below mentioned error on the console and getting the error "There is a JavaScript error in your browser console"

as a message box on the browser.

Any hints folks?

 

Ref. Console Error

ReferenceError: ScriptLoader is not defined

1 ACCEPTED SOLUTION

Sure, it's already official but feel free to ask them.

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

View solution in original post

4 REPLIES 4

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

ScriptLoader doesn't work when Catalog Client Script is started from Service Portal, it works well only from std user portal.

Have a look at the discussion below:

ReferenceError: Class is not defined in Catalog Client Script (Service Portal)

Also check the following articles:

https://blog.jacebenson.com/post/2017-10-16-sp-woes/

https://blog.jacebenson.com/scriptloader/

Hope this will be useful for your need!

Please, remember to mark Correct or Helpful if you find my response useful.

Cheers
Alberto

Thanks for the reply Alberto. I'am trying to get an official confirmation from ServiceNow on this.

I have tried invoking this API in different ways on Service Portal and through catalog client scripts but nothing has worked so far. All i get is "Scriptloader not defined" error.

Sure, it's already official but feel free to ask them.

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Cheers
Alberto

Swarup Roy
Kilo Expert

So, finally, ServiceNow confirmed that this API is not supported in the client scripting environment and they will get this updated in their official documents.