Servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 11:29 PM
Case: On portal the termination date is read only and the date is populating based on user we select,if i select past date the form is getting submitted.It should save only when the extended date is selected as future
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 12:04 AM
Hi @HARSHA GOWDA R ,
I checked your problem in my PDi anit works for me there is no issue with code may be you can change the UI Type to ALL
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 12:13 AM
I have made some changes in your code and its working.....
Try this code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 01:18 AM
g_form.getValue() method returns the field value as a string. Comparing strings is not the same as comparing dates and can lead to unexpected results. You need to convert the strings to dates while taking care about the date format. Only then you can compare the values correctly.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/