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
Sreenivasulu AdipudiSreenivasulu Adipudi 

My Case records with approval history report

Hi Everyone,

I have a requirement to create a report as follows:
Display logged in user's Case records with Approval history data.
I created a report using the 'Process Instance' object. But the issue is it is displaying all Cases information irrespective of the logged-in user. Is there a way to display only 'Logged in user Cases with Approval history'.

Thanks in advance.
Sreenivasulu A.
Best Answer chosen by Sreenivasulu Adipudi
RituSharmaRituSharma
You may use status field of process instance to filter out the needed records. But the problem is that you won't be able to filter out the cases of current user.

You would need to create a custom lightning component/VF page to serve the purpose.

All Answers

RituSharmaRituSharma
You may select My Cases but that would mean cases owned by current user but here I think you want cases created by logged in user. You may create a hidden formula field on case object, if logged in user id = creater's id then store Yes else store No. You may then use this formula field in your report filter. But please note that it might slow down the performance of the reports if no. of records are more. You may add other necessary filters to the report to minimize performance impact.
Sreenivasulu AdipudiSreenivasulu Adipudi
Hi RituSharma,

Thank you for your quick response. I want to display Cases with approval history. Approval history information will store on the 'Process Instance' standard object. We can't make 'Process Instance' as a child on Report type. My requirement is to display the Logged in user's Process instance records only.
RituSharmaRituSharma
Got you now.

You may create report on Process Instance and show case number(using Record Name field) but you won't be able to filter cases that were created by logged in user. So technically it's not possible with reports. 

But i really don't understand the business benefit behind this requirement. I mean what they want to achieve with this report. Approval history/hierarchy might have multiple levels so they should check individual case for details instead of expecting in one report.
Sreenivasulu AdipudiSreenivasulu Adipudi
We have multiple levels in the approval process. For example
  1. If a Case is approved at 'Level 1' then it will go to 'Level 2'.
  2. If it approved in 'Level 2' then it will go to 'Level 3'.
The requirement is to see a list of cases with the current level, assigned approver, and elapsed time.

Thanks,
Sreenivasulu A.
RituSharmaRituSharma
You may use status field of process instance to filter out the needed records. But the problem is that you won't be able to filter out the cases of current user.

You would need to create a custom lightning component/VF page to serve the purpose.
This was selected as the best answer
Sreenivasulu AdipudiSreenivasulu Adipudi
Thank you very much for your Help.