+ Start a Discussion
jarrodmichaeljarrodmichael 

Mass Submit Approvals

Does anyone know of a way to create a "Mass Submit for Approval" button on a Custom Object?  I have the process already created but we need to be able to submit many at once.  Any help is appreciated!

Ispita_NavatarIspita_Navatar

Apex provides support for creating a programmatic approval process to extend your existing approval processes with the following:

The Apex process classes: Use these to create approval requests, as well as process the results of those requests. For more information, see the following:

- ProcessRequest Class

- ProcessResult Class

- ProcessSubmitRequest Class

- ProcessWorkitemRequest Class

• The Approval namespace process method: Use this to submit an approval request, as well as approve or reject existing approval requests. For more information, see Approval Methods.

For more information on approval processes, see “Getting Started with Approval Processes” in the Salesforce.com online help.

Since Apex proves for programmatic submission of records for approval , so one can easily extent it for having a functionality scaling multiple records.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

jarrodmichaeljarrodmichael

Thanks for the reply!  I am just learning APEX coding.  Can you help me out as to how to have it auto-submit or create a button that will let me submit a list?

 

Here is what I have from an example in the help file that I am trying to customize:

 

 

// Insert a PO  
    
Purchase_Order a = new Purchase_Order(Line_Items_Count__c>0);
insert a;
// Create an approval request for the account  
    
Approval.ProcessSubmitRequest PO_Approvals_Standard = 
      new Approval.ProcessSubmitRequest();
PO_Approvals_Standard.setObjectId(a.id);
// Submit the approval request for the purchase order  
    
Approval.ProcessResult result = 
                   Approval.process(PO_Approvals_Standard);

// Insert a PO      
Purchase_Order a = new Purchase_Order(Line_Items_Count__c>0);
insert a;
// Create an approval request for the account      Approval.ProcessSubmitRequest PO_Approvals_Standard =       new Approval.ProcessSubmitRequest();PO_Approvals_Standard.setObjectId(a.id);
// Submit the approval request for the purchase order      Approval.ProcessResult result =                    Approval.process(PO_Approvals_Standard);

 

pmozz01pmozz01

Hi Jarrodk - I was wondering (hoping!) that you have figured out how to create a Mass Submit for Approval button on a list.  I, too, have an established approval process however, the standard home page component does not provide enough information for the approver to make a decision on whether or not to approve.  The list view of the object is perfect for displaying all the necessary fields, but I need the manager to be able to select multiple items for approval and/or rejection.  I've been reading through the ProcessRequest classes, but am totally lost.  I'd appreciate any help you could provide.

 

Thanks,

Pat

hprakashhprakash

has SalesForce or anyone else been able to develop/ create a Mass Submit & Approval button from the list view yet?  I feel like it is possible but I don't know enogh about Java & I know less about the "names" of standard salesforce fields & processes.

 

-h