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
Trainee DevTrainee Dev 

Adding custom logic when reassign approval process

I'd like to describe this case in detail: First , we have created an custom sObject which OWD is Private Second, we have an approval process on this sObject and user created an record and submit for approval Third, his manager reassigned user's request to another person who has no right to view user's record because OWD is private and also has no role hierarchy with this user My question is : Can we add custom logic when manager reassign this approval to another person? So that we can apex sharing this record to person.

Appreciate for any help
Best Answer chosen by Trainee Dev
Deepali KulshresthaDeepali Kulshrestha
Hi Trainee,
Greetings to you!

I have read your problem - "Can we add custom logic when manager reassign this approval to another person?"
- No, you can not add custom logic when manager reassigns this approval to another person.
- I am referring a link below, on this page press Ctrl+f and search ("Delegate approvers cannot reassign approval request")
Please check this link it will solve all your queries related to the reassign approval process
https://www.salesforcetutorial.com/approval-process-example-in-salesforce/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha

All Answers

Ajay K DubediAjay K Dubedi
Hi ,
For creating Approval Processes we have follow 8 steps

Setup=>Build=>Create=>Workflow & Approvals=>Approval Processes
Step 1:- Selecting Approval wizard.
We have two different types of wizards they are
1. Jump Start wizard :– Jump start will have automatic default settings and it is quick way to create simple approval processes.
2. Standard Setup Wizard :- By using standard setup Wizard we can create complex approval processes which have multiple steps.
 
Step 2 :- Enter name, Unique name and description.
Now specify the entry criteria and this is optional . This option is used to mention which record should enter the approval process. We can enter formula logic or Selecting certain fields, operator and value as shown below.

Step 3 :- Selecting Approver Field and Record Editability Properties.
In this step we want to sent automatic approval request to a user called manager so select manager as shown below.
When a approval process is assigned to a user, salesforce.com automatically sends e-mail so we have to create E-mail template to select E-mail notification template in Step 4.

Step 4 :- Select Email Notification Template.

Step 5 :- Select Fields to Display on approval page Layout page.
Approver page is that where approver approves or rejects a request. Here we select the fields that to display on the approval request request page. We have selected the field to display like Date, Status, Assigned to, Actual Approver, Comments and Overall Status as shown below.

Step 6 :- Specify initial Submitters.
We have selected opportunity owner user to submit records for approval and optionally we can select Add the approval history relates list to all opportunity page layouts and Allow submitters to recall approval requests.

Select Save Button.

Creating Approval Steps.
We are able to activate the approval process until we have created at least one approval step for approval processes.

To create approval steps go to Setup=>Build=>Create=>Workflows & approvals=>Approvals=>select the approval process we have created=>Approval Steps=>New approval Step.

Enter name, Unique name description and Step number as shown below.
Now select Next.

In Step 3 : Select Assigned Approver where we choose to approve he record.
When we select Automatically assign to approver(s) option the page will be like below

Now Select Save Button.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Deepali KulshresthaDeepali Kulshrestha
Hi Trainee,
Greetings to you!

I have read your problem - "Can we add custom logic when manager reassign this approval to another person?"
- No, you can not add custom logic when manager reassigns this approval to another person.
- I am referring a link below, on this page press Ctrl+f and search ("Delegate approvers cannot reassign approval request")
Please check this link it will solve all your queries related to the reassign approval process
https://www.salesforcetutorial.com/approval-process-example-in-salesforce/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
This was selected as the best answer