Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Client and Server side validation practices example code

leslie8
Mega Expert

I have been doing a lot of validation lately on Catalog items and I am using Catalog Client Scripts. This is fine, but I want a way to validate BOTH on the client and on the server.

What is the cleanest, most secure best practice way to do this?

I know I should use a client script to call a server-side script, preferably an asynchronously. I'm not exactly sure how to go about structuring my code. Can anyone share an example? I have been looking online and reading the wiki but I need a full end-to-end example to really solidify the way that I will be approaching my code.

Thanks

2 REPLIES 2

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Leslie,



Please go through the below link which has an example.


GlideAjax - ServiceNow Wiki


Please let me know if you have any questions.


leslie8
Mega Expert

thanks, I think I have the basics from the article. I was wondering if anyone has used this approach for client and server validation and if they could share an example? I have client validation very well but am still lost on how to structure the server validation in a way that meets best practices.



Thanks!