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
bakumbakum 

Overriding the Submit For Approval button

Hi, I want to override the Submit for Approval button...where the heck is it??  it's not on the opportunity.  Where is it?  Setup>>Customize>>???

Also, any hints on how not to override it completely, just want to insert a little ajax like a trigger that will run through the line items and do some wizardy on them and set some fields in a certain way when that button is hit.  I'm thinking this is the process I would run through, what do you think?

-overridden button is pressed
-run api calls to do the changes on the line items as needed
-run api call to submit opportunity for approval
-reload page to same location as you would get to after pressing the standard Submit for Aproval button.

Thanks!

-mb
jf317820jf317820
i dont believe you can override the "submit for approval" button at this time...someone correct me if i'm wrong.
bakumbakum
@*^!#^&*

Thanks.
jf317820jf317820


bakum wrote:
@*^!#^&*

Thanks.


i feel your pain...i ended up re-working our approval processes in s-control form in order to inject necessary customizations

jhennyjhenny

Not sure if this helps but I found a way to trigger to APEX before submitting the record for approval:

1 - add a field update as one of the initial submission actions  (for example Status = Awaiting Approval) 

2 - write a before update trigger that runs your code for the records where Status = Awaiting Approval