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
AndyuxAndyux 

check records in a related list

How can i check if a related lists has records? to fieldupdate a checkbox, if records in related list, TRUE. Thanks!
Best Answer chosen by Andyux
HARSHIL U PARIKHHARSHIL U PARIKH
I would say you can do this without creating a workflow or process builder.

If the relationship is master detail then have a rollup summary field which counts number of child records. Once done, have a formula field on Parent object with return type as checkbox. Have a formula which says
If (Roll_Up__c > 0, TRUE, FALSE)
Hope this helps!

All Answers

goabhigogoabhigo
What is the relationship between the objects? If MD, then you can create a roll-up summary field to count the no. of child records. Then create workflow field update, if that field is greater than 0, update the checkbox.

Does this help?

--
Abhi
David HalesDavid Hales
Hi Andy ,
You Can use Process builder and Workflow
You can put Condition field value is Greater equal to 1 and Update the checkbox true.

Hope this helps

Best regards 
David Hales (1058)

 
HARSHIL U PARIKHHARSHIL U PARIKH
I would say you can do this without creating a workflow or process builder.

If the relationship is master detail then have a rollup summary field which counts number of child records. Once done, have a formula field on Parent object with return type as checkbox. Have a formula which says
If (Roll_Up__c > 0, TRUE, FALSE)
Hope this helps!
This was selected as the best answer
T Hari Priya ReddyT Hari Priya Reddy
What if it is Lookup relation?