Apply Client Script in the Catalog Item

NehaSNOW
Tera Guru

Hi Members,

 

I have written the Client Script in the form and want to apply the same in the Service Catalog. I know that Client Script are not meant for Catalog Items for that I have to write a Catalog Client Script. But is there a way to call the Client Script from Catalog Client Script or any other way to utilize that Client Script in the Catalog Item or else I have to write the same code in the Catalog Client script that I have written in the Client Script?

 

My intention is to utilize the Client Script instead of writing the code for Catalog Item. Please suggest.

 

Release - Xanadu.

 

Thanks,

Neha Pateria

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@NehaSNOW 

Sorry both are made for different purposes and cannot be used across

Normal client scripts -> run on normal form for table

Catalog client scripts -> run on record producer or catalog item

You can access variable values in normal client script using this syntax though if that record got generated via record producer or it's RITM or SC TASK form.

g_form.getValue('variables.variableName');

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

@NehaSNOW 

Hope you are doing good.

Did my reply answer your question?

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

Ankur Bawiskar
Tera Patron
Tera Patron

@NehaSNOW 

Request you to close your earlier questions by marking appropriate response as correct.

Members have invested their time and efforts in helping and responding to your posts and replies.

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