Not really sure I understand your question. "Shouldn't that "Approve or reject based on the FIRST response." option stop the process? " No - it only applies to that step not the entire process. If you want the approval to skip the remaining steps then set a flag on the record and bypass the remaining steps by checking on the entry ...
If there are no applicable active approval processes, the standard submit for approval button will show a standard error message. This cannot be changed to my knowledge.
If you instead use a custom button to launch a flow, you could
a) use a flow decision element to determine if the criteria are met, and if not, show a custom screen with your message. If ...
There is one checkbox called "Re-evaluate Workflow Rules after Field Change" available under field update. Uncheck that checkbox so it won't fire the workflow if the date is changed via approval process rejection action.
You will have to explicitly call the approval process in your trigger.
Approval logic should be in after context, you can set the field's value in before trigger and call the approval process in after trigger.
Approval.ProcessSubmitRequest approvalRequest = new Approval.ProcessSubmitRequest(); approvalRequest.setComments('Offer Submitted for approval'); ...
Approval processes and Triggers are generally not going to be run in a common transaction.
We can submit records into approval processes via apex using the Approval class, the given example being
Account a = new Account(Name='Test', annualRevenue=100.0);
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
All you need is to make sure you have an entry criterion for your Approval Process and not leave it open-ended.
If you have a criteria, make sure you AND the existing criteria with status!=void that way approval flow only enters when the status is other than void.
Check the below screenshot
The user should exist in both the orgs. If the user doesn't exist in the target org then you can choose one of the option to resolve this.
Create same user in the target org.
Remove that user from approval process and then deploy the approval process.
Following are the two scenarios/use cases that come to my mind :
You just want to in-activate the older Approval process
In the scenario 1, you can go ahead and make your approval process inactive and create a new approval process. The older records which were in the approval process would just be there in the "ProcessInstance" object. If needed, ...
you must be marking the opp field Final_Approved__c as true on last approval by approval field update.
In this case your approval field update is hapenning before approval data is commited to the data base i.e before save point.
to fix this, in case when your field Final_Approved__c is true you can run the future method from the trigger which will run after ...
Uncheck 'Modify All' permission for that particular object on the profile level to hide Approve/Reject button on the approval history.
For the 'Recall' button, disable 'Allow submitters to recall approval requests' under Submission Settings in your approval process. There is an Idea link which has details on limitation for Allowing record owner to recall ...