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
Justin LJustin L 

Setting a checkbox based on a field value appearing in a related list

This is probably an easy one for you, I'm just having a very hard time getting my search terms right while looking for an answer.  I'm a click admin, and I'm working on creating a checkbox that will mark itself true if a specific field value shows in a related list.   We have a list of items, and each item has a family (for example, part# 330455 would be included in Widgets, and part# 330456 would be in Sprockets.)  On our contracts, we have a related list that has each item, it's volume, and it's price that fills into a table on the final contract.  What I would like to do is have a checkbox mark itself if "Sprockets" shows at any point in that related list.  The family field is a picklist, which gives me some restrictions on formula.  My most recent attempt is IF(ISPICKVAL(Item_r.Family_c,"Sprockets"),TRUE,FALSE), but since not all items on the deal may be sprockets, it has been coming back false.  Any ideas?
Best Answer chosen by Justin L
Hargobind_SinghHargobind_Singh
Hi Justin,

You should rather try to create a workflow on your child object (deal-item) and update checkbox on parent (Deal). 

So your workflow rule would run on your deal-item object and check for Family_c,"Sprockets", if found, then checkbox on Deal would be set to true. This way if system finds one or more sprockets, the checkbox would be true. 

Here is some information: https://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US