How to disable/not editable Submit button for record producer in Portal and Native view?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 10:21 PM
Hi Team,
I need to make readonly/Disable "Submit" button in both Native and Portal view for below scenario:
If "Requested for" is not a manager, I need to Disable/Make readonly Submit button in both the Native and Portal view.
Please suggest how can I achieve this scenario.
Thanks & Regards,
Prasanna Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 10:27 PM
Most probably you cannot disable submit button based on condition, but you can write onsubmit client script
to check if user is not manager, then submission is not allowed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 10:31 PM
@PrashantLearnIT Thank you for your quick response. Yes, I've written the below onsubmit script but, it is not stop the submission:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 10:41 PM
when using GlideAjax in an onSubmit Client Script you have to follow a certain pattern. Otherwise it will not work. Please refer to ServiceNow's official knowledge article about the same: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0783579
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2024 10:50 PM