Assistance Needed for Custom Submit Button Configuration Without Modifying OOB Elements

Khalid9030
Tera Contributor

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.

1 ACCEPTED SOLUTION

@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

View solution in original post

13 REPLIES 13

@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

@Khalid9030,

 

If my answer helped you please mark it as correct for others to see.

 

Thanks

 

Jake

@Jake Sadler 

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();
}

@Khalid9030 

Make sure, show on insert is ticked and show on update is ticked

@Jake Sadler 

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?