1

I am trying to create a checkbox formula field on Account object.

This is to be checked based on the record type and isactive field in another object (say Rel__c Object). These two objects have a master-detail field on Rel__c Object.

If there is a record with IsActive=true and record type = 'XYZ' or record type ='ABC' on Rel object, then the check box on Account should be Checked.

When I create a formula field with return type checkbox , I dont see the option to select the Rel__c object in the formula editor.

1 Answer 1

1

Formulas cannot reference child objects directly. What you can do is make a Rollup Summary Field, then use a Checkbox Formula based on the results of the Rollup Summary calculation. The Rollup Summary field can be "COUNT Rel__c WHERE Is Active EQUALS true AND Record Type EQUALS 'ABC','XYZ'". The field would have either a zero or non-zero value, which means the formula can then be Rel_Active_Counter__c > 0. The native functionality should work just fine, or you could use DLRS if you prefer.

4
  • Thanks, I will try the rollup summary field approach. Will this evaluate existing records in the object too?
    – Techie
    Commented May 15, 2019 at 3:52
  • 1
    @Techie Yes, the system Rollup Summary Field feature will recalculate all the values for existing records (this may take some time, in which case you'd be notified by email). DLRS can also perform an on-demand calculation if you choose that route as well. Either way, there should not be any need to manually update the records.
    – sfdcfox
    Commented May 15, 2019 at 3:55
  • While creating a rollup summary field, in the filter criteria section - I dont see the option to evaluate based on "OR" condition. There is "AND" between each criteria.
    – Techie
    Commented May 15, 2019 at 4:22
  • 1
    @Techie You can use a comma to specify multiple values, just like in a report.
    – sfdcfox
    Commented May 15, 2019 at 4:33

You must log in to answer this question.

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