function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vikmacvikmac 

Do not want "Submit for Approval" after Step 1

Hi All

 

I have an Approval process for which I have only 1 step that is to be approved by Approver.

Once the request is approved by the Approver, I don't want to have them see the "Submit for Approval" button on the page as the button is meaningless, since there are no further steps.

 

Any idea how to do that ?? i.e. remove the default button appearing on the page displayed after the approval is done??

 

Any help will be great.

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
tstrongtstrong

Create a record type on the object that is being submitted for approval (record types are listed under the object in the Customize section).  Then create a new page layout that is a clone of your existing page layout, just without the submit for approval button.  Then assign the new page layout to the new record type for all profiles.

 

Then you'll need to set up your approval process so that it changes the record type to the new one you created when it is approved.  This will in turn change the page layout.

All Answers

snugglessnuggles

hi vikmac,

 

i don't think there is a quick way to conditionally display a button, allowing submit for approval to be hidden if it has already been approved.  i would probably try to come up with a visualforce solution.  If you are okay with the approval history being at the bottom of the record's page layout, you might try creating a custom visualforce page with the standard detail tag (with related lists) at the top, then reconstructing the approval history related list with build in logic to conditionally render the "submit for approval" button.  there might be another way, but off the top of my head this seems like the way to go about it if you are looking to minimize the need to recreate native functionality.

tstrongtstrong
You could create a new record type that uses a page layout that does not have the Submit for Approval button on it.  The approval process could update the record type to the new one you created after the record is approved (as part of the Final Approval actions).
my_sforcemy_sforce

Can you please tell me what do you mean by "new record type"..

actually, I am new to everything, so don't get the terms easily...

 

Thanks

tstrongtstrong

Create a record type on the object that is being submitted for approval (record types are listed under the object in the Customize section).  Then create a new page layout that is a clone of your existing page layout, just without the submit for approval button.  Then assign the new page layout to the new record type for all profiles.

 

Then you'll need to set up your approval process so that it changes the record type to the new one you created when it is approved.  This will in turn change the page layout.

This was selected as the best answer