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.


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.

  • Thanks, I will try the rollup summary field approach. Will this evaluate existing records in the object too? – Techie May 15 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 May 15 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 May 15 at 4:22
  • 1
    @Techie You can use a comma to specify multiple values, just like in a report. – sfdcfox May 15 at 4:33

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.