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
bclapperbclapper 

Custom Objects in Field Dependencies.

I work for a company the represents mulitiple manufacturers.  I created a custom object (Manufacturer) and added it to the Leads, Opportunity & Cases objects as a look up.  What I am trying to do is create a custom multi pick list containing "product groups" on the Opportunity tab where the values availible are determined by what Manufacturer is selected.  When I try to set up the field dependency, my custom object "Manufacturer" is not listed under the Controlling field.  Is there a way this can be done using the Professional Edition?
 
TCAdminTCAdmin
Hello bclapper,

The lookup fields are not picklists so can not be used in the dependency. The only possible way to do this would be a validation rule but you still have issues with that. When validation rules use lookup fields they utilize the Id of the looked up record and not the name. Your validation would need to be similar to the one below.

AND(
  Lookup__c = '000000000000000',
  NOT(ISPICKVAL(Picklist__c, 'Value 1')),
  NOT(ISPICKVAL(Picklist__c, 'Value 2'))
)

If the lookup field equals a manufacture they will only be able to save it with value 1 or value 2.
bclapperbclapper
What I thought about trying to do was to create a "manufacturer picklist" that contained the exact same values as the  "manufacturer names" in the custom object and then trying to write and s-control to set the "manufacturer picklist" value equal to the "manufacturer names" field.  The "manufacturer names" field would then be the controlling field for the product group field.  I wouldn't put the manufacturer picklist field on the opportunity page layout so it would look like the "manufacturer name" field was the controlling field.  Do you think that would work?
TCAdminTCAdmin
bclapper,

The problem with this would be that the value in the dependent picklist would not change until the record is saved. If a record had X for lookup and a user changed it to Y they would need to save the record, and then edit it again to get the correct product list. If you were to have them select the manufacturer in the picklist it would update the product information at that time. When you save the record you would then update the lookup field with the same as the picklist but I don't know if that would be what you are looking for.