script include

Dizy M
Tera Expert

Hi!

 

Can smeone pls explain where to get this (the highlighted)?  Is this coming from a field in a table?? 

 

DizyM_0-1699877315612.png

I'd appreciate any help. thank you!

1 ACCEPTED SOLUTION

Shubham Singh
Mega Guru

Hi @Dizy M 

 

You can find it in Client Scripts or UI Action Scripts. Basically, if you have to pass any parameter (or data) from client-side code to server-side code, you have to use GlideAjax API to achieve it. You can pass the parameters using the addParam() method of GlideAjax API and fetch it in the Script Includes using this.getParamater() method.

 

Attaching the reference to get more idea on this:

https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet/ta-p/2312430

 

Thanks!

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up 🙂

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Dizy M 

this.getParameter() is used when this script include function is being called from GlideAjax from client side code.

sysparm_sysID is name of that parameter and that parameter will hold value which is set using GlideAjax

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

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