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
sheila srivatsavsheila srivatsav 

Custom object issue

I have 2 custom objects i.e objOppor and ObjProduct

ObjProduct is a lookup to objOpportunity.

I need to implement as shown below using datamodel in salesforce.

product          Mandatory fields in objOpportunity
ProductA       date
                      Price

ProductB      Name
                     Qty

ProductC     complain
                    status
               
For every poduct there are certian fields mandatory in the parent object objOppor.

so when I create new record of objOpportunity object and select ProductA from Lookup then I need to enter data into the fields Name and Qty only

similarly if I create record of objOpportunity and select productB from lookup, so in objOpportunity , only the fields Name and Qty should appear and they should ne mandatory.

May I know how to achieve this inside the salesforce datamodel only?

sheila
Bhavdip P GadhiyaBhavdip P Gadhiya
Hi,
if this are three products then you can create validation rule.
if more than 3 products then u have to give some critria based rule.

Thanks.