- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-08-2023 08:44 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-08-2023 09:36 AM
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-08-2023 10:28 AM - edited ā12-08-2023 10:29 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-08-2023 08:55 AM
Hi @akash12345
use a UI Policy for this - there's a "on or before today" condition.
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-08-2023 09:05 AM
Hi @akash12345 ,
Please use a UI policy for this requirement where u can achieve this with minimal script.
Create a UI policy with condition as Ship Time Stamp is before today.
Navigate to Script section & under if script evaluates to true u can write this
alert("Past Dates cannot be selected");
g_form.clearValue('ship_time_stamp');//use proper backend value
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-08-2023 09:05 AM
Hi Atul,
Thanks for reply. I have used same but pop-up is coming which is saying that it should not be today or past date. I want current date and future date only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-08-2023 09:08 AM