- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 11:46 PM
Hello,
I have created a custom Submit button in a scoped application for a table. When the user clicks on the submit button, it will update an existing field and redirect to the list view. To hide the OOB submit button, I added the condition current.getTableName() != 'x_gsp_check' to the out-of-the-box submit button. However, my client has requested not to change any existing OOB elements. I have heard that we can use the override option to achieve this. I would like to know how to configure this without changing the OOB submit button. Please assist me.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 12:40 AM
@Khalid9030, ensure the action name and name of the ui action is the same.
This will override it and then you can change the script field to meet your requirements
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 12:55 AM
@Khalid9030 follow the same process and create 2 new Save buttons ensuring the action name and name of ui actions are the same as the OOB versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 01:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 01:31 AM
I have added the below code in custom save button and its working as expected and i can be able to see only one save button during insert and update.
if (current.isNewRecord()) {
current.insert();
} else {
current.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 01:38 AM - edited 08-06-2024 01:38 AM
Make sure, show on insert is ticked and show on update is ticked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 02:04 AM
Thanks for quick response.
i would like to confirm with you one last question is that, the OOB Submit and Save contains the conditions as given below.
New record contains the Save condition -->current.canCreate()
Update Save contains the condition is ---> !(current.isNewRecord() && !current.canCreate()) && current.canWrite()
Submit button condition is -->current.canCreate()
should i need to mention same conditions in custom created buttons?