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.

Date should not be past date it should be current or future.

akash12345
Tera Contributor

In my catalog item I have used one field, named as  Ship Time Stamp as field type date. So I have to used  current date or future date only. So can you please help me with the script.

2 ACCEPTED SOLUTIONS

Hi @akash12345 

 

Please share the UI policy screen shot. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

Hi @akash12345 ,

 

If u r checking this on portal please change run script UI type to All instead of Desktop. It will work. Also if u have another client script doing the same thing please deactivate it. UI policy is sufficient.

 

 

Thanks,

Danish

 

View solution in original post

16 REPLIES 16

Hi @akash12345 

 

It is working fine for me

 

LearnNGrowAtul_0-1702058803278.png

function onCondition() {
g_form.addErrorMessage("Acceptance Criteria is required.");
g_form.clearValue('LNGDate');
}
*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @akash12345 ,

 

If u r checking this on portal please change run script UI type to All instead of Desktop. It will work. Also if u have another client script doing the same thing please deactivate it. UI policy is sufficient.

 

 

Thanks,

Danish