g_scratchpad not available in the platform

Giri6
Tera Expert

I am using this code and it works fine in  service portal for a catalog item. but gives error that it can't find g_scratchpad in the platform. Any work around to work in plat form as well. Appreciate it. I need it to substitute  synchronous ajax in submit handler.

 

if (g_scratchpad.isFormValid)
return true; //Don't submit until this value is true

 

2 REPLIES 2

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Please check the below article for the same:-

 

https://www.servicenow.com/community/service-management-forum/g-scratchpad-not-working-on-native-ui-...

 

Please mark my answer as correct based on Impact.

Aman Kumar S
Kilo Patron

Hi @Giri6,

 

For better explanation you can refer to below links specifically response by Maik Skaddow:

g_scratchpad.isFormValid? How does it work? 

How to do async validation in an onsubmit client script. 

Best Regards
Aman Kumar