Application (Record Producer) Submission during the Specific Months
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2024 05:39 AM - edited ‎04-23-2024 09:20 PM
I have a use case for submitting the application for users from ESC portal, I created a record producer.
The requirement is that application submissions should only be allowed during June-July every year and the apply (submit) button should only be clickable during that period. Outside of this period, users should still be able to access the record producer for informational purposes from the ESC portal. Also, business needs the flexibility to open/close applications on an ad-hoc basis (outside the June-July window).
Can anyone suggest other effective ways to achieve this use case requirement (if possible without DOM manipulation) related with the potential for ad-hoc overrides?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2024 10:56 PM
you should create a schedule for this which includes only 1 June to 31st July and then handle the validation using onSubmit
OR
You can use onSubmit validation script and see if today's date is between 1 June to 31st July, if yes then stop the form submission and show alert, Don't hide the submit button as it will require DOM manipulation
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2024 03:14 AM - edited ‎04-24-2024 03:20 AM
Hi @Ankur Bawiskar , Thanks for your response.
Yes, we can restrict users to submit the request using onSubmit script however, users still have to put the efforts to fill the form which is not a good experience from customer's pov.
Alternative is that we can make all the variables readonly if it's outside of Jun-Jul period by using "g_form.setVariablesReadOnly(true)" in client script but again that is not working on ESC portal. here is the script FYI.
As I mentioned initially there are two parts to achieve
1. submissions should only be allowed during June-July every year. Outside of this period, users should still be able to access the request for information on ESC portal.
2. Business needs the flexibility to enable/disable the application request on ad-hoc basis (outside Jun-July) without making significant config changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2024 04:26 AM
if you want to have good user experience then simply hide that item using User Criteria during that time frame.
Then they need not fill and wait for validation
What's the point of showing that form if they are not meant for submission during that period?
You can do this ( the best approach I could think of)
1) use onLoad catalog client script and validate using Ajax the time period
2) if it's within that period, show alert and redirect user to the portal homepage
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 08:15 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader