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
HuluSFAdminHuluSFAdmin 

Creating Parallel Approval Processes

I need to create several approvals on an Opportunity before it is marked as "Closed Won".

The approvals needed are the following -
  1. Sales Manager to approve any discounts of products
  2. Inventory Mgr to approve availability of products
  3. Finance to approve pricing & discounts of products as well.

These approvals can happen in parallel by different users belonging to the 3 different divisions - Sales, Finance, and Operations.

I tried creating multiple Approval Processes for Sales, Inventory and Finance but since they are all associated with the Opportunity object - so only 1 of the Approval process is getting triggered. Using Approval Steps make it a serial process?

Any idea how I could implement this?
Scott JorgensenScott Jorgensen
You can do what you want if you use the parallel approvals feature.  The key is to bundle all 3 processes into one large "Opportunity Approval Process".  Then all 3 of your existing processes can happen in parallel.
.msg_source_code { border:1px solid black;padding:10px;display:block; }
HuluSFAdminHuluSFAdmin
Can you give me more details on how to set this up?
Scott JorgensenScott Jorgensen
Here's a link to the feature overview from Summer '08: http://blogs.salesforce.com/features/2008/05/parallel-approv.html

It's hard to provide more guidance without knowing more specifics about your approvals.


Message Edited by Scott Jorgensen on 10-06-2008 10:44 AM
pbuipbui
I am also trying to do this.  Let's say I have Products X, Y, Z possible to add to an Opportunity.  Each Product has it's own approver.  I want the approver to have to approve it only if that Product exists in an opportunity.  I want to do this in parallel so it doesn't slow down the process, and they are independent of each other.  Each Approver's approval will update their specific X, Y, Z related fields.  When none of the X, Y, Z approvers reject the product, it goes to a head approver to officially sign off (incremental step).  How would I do something like this within the limits of the Approval process now?
Message Edited by pbui on 07-21-2009 01:33 PM
skmskm

Hi I am trying to update the in processinstance status comment in case of parallel approver. when one approves the other should be approved and put the comment for 2nd approver. and go to the next step for approval.

my code as follows

 

Approval.ProcessWorkitemRequest req = new Approval.ProcessWorkitemRequest();

ProcessInstanceWorkitem[] wi = [

Select p.ProcessInstance.Status, p.ProcessInstance.TargetObjectId,

p.ProcessInstanceId,

p.OriginalActorId,

p.Id,

p.ActorId From ProcessInstanceWorkitem p

where p.ProcessInstance.TargetObjectId = : qId

and p.OriginalActorId ='00550000000lfOD'];

 

 

req.setAction('Approve');

 

req.setComments('Approved-test');

Id wId;

if (wi.size() > 0){System.debug('testapprove1');

wId= wi[0].Id;

}

req.setWorkitemId(wId);

if(wId!=null){

Approval.ProcessResult result = Approval.process(req);

}

 

when I approve for one it creates another record with pending..

is there anything wrong.?

 

Any help on this would be  appriciated.