0

I have a customer object as master and Document object as Detail which has a Status__c field. Since its a Master-Detail there can be multiple Documents to the custom object.

I want to maintain a field in the Custom Object(Master) which tells me if all the Documents Status is "Verified" or not. i.e. for example, I can have a checkbox field in Master obj, which will be true when all the documents(detail) have status as Verified.

1

You'll have to either write code, use a third-party application like DLRS, or (if applicable) combine several out-of-the-box customizations to achieve this result.

The hopeful situation is that your Status__c field is just a text field and can be filtered in a native Roll-up Summary Field. If so, you could solve this use case by creating two Roll-up Summaries from Document to Customer. One would be a COUNT() summary of all Documents, and the other would be a COUNT() summary that filtered based on the Status__c field.

Then, you'd add a formula field with the type Checkbox which simply compared the two Roll-up Summaries to obtain its value.

If that doesn't work for some reason, I'd recommend implementing the same pattern with DLRS rather than writing an Apex trigger or triggers from scratch.

  • Thanks David. this worked for me. – SFKumar Aug 28 at 12:29

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.