OOB Save button hide in scoped app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 06:39 AM
Hello All,
Need help for the below
When a form is submitted, the out-of-box (OOB) save button/context menu save should not be visible if the user opens the same record again. Is it possible to achieve this requirement?
Additionally, we have a custom submit button. When the user clicks on it, the draft field is updated to true, and the form redirects to the list view. When the user reopens the same form, the submit button is hidden based on the condition in the submit button UI action: current.u_draft == true.
Is there a way to apply a similar condition to hide the OOB save button/context menu save?
Note : this is built in scoped application table
Thanks in advance:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 06:54 AM
Hi @Khalid9030
Do you want the save button to be hidden for that user who saved it earlier or for the every user? And May I know the table name?
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 07:02 AM
Thanks for your reply.
its for every user. and the table is custom table which is created in scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 07:07 AM
Hi @Khalid9030
You can create the 'OnLoad' client script and check the state of ticket (i.e. closed), then hide UI Action and context menu as bellow:
// Hide the save button and the save option in the context menu
g_form.setSaveHidden(true);
g_form.removeMenuOption('save');
I hope my answer helps you to resolve your issue if yes, mark my answer correct & helpful.
THANK YOU
rajesh chopade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 09:02 AM
I have used this but its not working PFA. please correct my code if its wrong