1

I have two objects Test Plan ( Master ) and Test Plan Script ( Detail). Test Plan has 2 roll up summary fields - "Scripts passed" and "Scripts failed" where summary type = count and filter condition = Test Status = Passed, Failed. Test Status is a picklist field on Test Plan Script.

There is another field "Master Test Plan" on Test Plan which is a self look up to same Test plan object.

Roll up summary fields are able to get the count of passed and failed Test plan scripts which are directly linked to their Test plan

Issue is when Master plan has related sub test plans ( sub test plans have test plan scripts ), rollup summary field shows zero passed zero failed even though its sub test plans have some test plan scripts passed and failed.

Can we achieve the cumulative count of test plans scripts passed/failed on the master test plan by creating new formula fields or creating bucket fields in the reports.

I hope my question is not confusing and wanted to know if we can achieve with out apex code.

  • n.b. the reason the master test plan doesn't have values in its RSF field is because it has no direct Test Plan Script Detail children. RSF only works across master-detail relationships. However, as a supplement to Jenny B's answer, you could consider package Declarative Lookup Rollup Summaries (free) that will do RSF across lookup fields – cropredy Dec 13 '14 at 23:12
2

This answer assumes that the parent child relationship between Test Plan and Sub Test Plan only goes one level deep. I created a hyperlink formula field on the Test Plan to link to the Parent record which will either be itself or Master Test Plan when available.

HYPERLINK("/"&BLANKVALUE(Master_Test_Plan__r.Id, Id), BLANKVALUE(Master_Test_Plan__r.Name, Name))  

I then used this formula field to summarize the data on a Test Plan report to sum the pass and fails of the Sub Test Plans as seen in this image:
SampleReport
Same report with details:
SampleReportDetails

| improve this answer | |
0

If I understand you correctly, you may need another 'intermediate' object Sub Test Plan something like this in order to keep a tab on roll up summaries nicely. Obviously, you can manually calculate summary fields by using Apex code as well. 1

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.