0

I have standard approval process in opportunity. I want to create a report on approval process with opportunity.

I created a new report type with process instance and process instance node, but I need opportunity fields included with that approval process.

Is there any way I can do this with a report?

1 Answer 1

2

If you need info of the Opportunity record of the approval, I think the standard report will not work. There is an idea for that: https://success.salesforce.com/ideaView?id=08730000000l7SVAAY

From this blog: http://cherfeldman.blogspot.com/2014/01/potential-solution-for-reporting-on.html

Potential Solution: Add a custom object called “Approval History Reporting” to be a child object of opportunities through a master detail relationship. Add the following fields to the custom object:

  • Approval History Start Date/Time

  • Approval History End Date/Time

  • Approver – lookup to user

  • Approver Changed to – lookup to user From
  • Approval Status (picklist) – Submitted, Approved, Rejected, Recalled

  • To Approval Status (picklist) – Submitted, Approved, Rejected,

  • Recalled Approver Comments text field

  • Age = formula field to calculate Approval History End – Approval History Start, show number in hours

How this object will work Records will be inserted and/or updated when certain things happen.

Scenario 1: Opportunity is submitted for approval Upon initial submission of an opportunity to an approval process a record will be inserted into the Approval History Reporting with the following fields populated: Approval History Start Date/Time – Time opportunity was submitted for approval Approver – user selected as approver From Approval Status = Blank To Approval Status = Submitted

Scenario 2: Opportunity is Approved by Approver: Existing record with To Status of Submitted will update to have an Approval End Date/Time of the time the stage changed New record will insert with the following information: Approval History Start Date/Time – Time opportunity was approved Approver – user selected as approver From Approval Status =Submitted To Approval Status = Approved Comments = any comments entered by approver

Scenario 3: Opportunity is Rejected by Approver: Existing record with To Status of Submitted will update to have an Approval End Date/Time of the time the stage changed New record will insert with the following information: Approval History Start Date/Time – Time opportunity was Rejected Approver – user selected as approver From Approval Status =Submitted To Approval Status = Rejected Comments = any comments entered by approver

Scenario 4: Opportunity is Recalled by User: Existing record with To Status of Submitted will update to have an Approval End Date/Time of the time the stage changed New record will insert with the following information: Approval History Start Date/Time – Time opportunity was Recalled Approver – user selected as approver From Approval Status =Submitted To Approval Status = Recalled Comments = any comments entered by approver

Scenario 5: Approver is reassigned Existing record that is submitted with no End time will have the Approver Changed To lookup update to the new approver

Scenario 6: Opportunity is Recalled and User Submits Again New record will be inserted with the following information Approval History Start Date/Time – Time opportunity was submitted for approval Approver – user selected as approver From Approval Status = Recalled To Approval Status = Submitted

Scenario 7: Opportunity is Rejected and User Submits Again New record will be inserted with the following information Approval History Start Date/Time – Time opportunity was submitted for approval Approver – user selected as approver From Approval Status = Rejected To Approval Status = Submitted

Scenario 8: Opportunity is Approved and user hits validation due to product/pricing changes and is forced to submit again New record will be inserted with the following information Approval History Start Date/Time – Time opportunity was submitted for approval Approver – user selected as approver From Approval Status = Approved To Approval Status = Submitted

2
  • I need to create any trigger to insert record or Process builder is fine.And one more thing is how to achieve this for old records means all approved. @sfdc
    – Pavan tej
    Commented Jul 29, 2016 at 15:30
  • Try in mass transfer approval request for old records to be approved
    – SFDC
    Commented Oct 13, 2018 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .