I have a picklist field with values Plan A, Plan B and Plan C. I need to display picklist values in such a way that if another Custom lookup Field's value (say Book__c) includes the keyword 'History', only Plan B and Plan C values display and if Book__c includes the keyword 'Literature' all 3 picklist values display. How to achieve the same. I suppose validation rule is the solution, but could you please help me with the formula.
you need this while record insert or update and error must be on the page layout, right ?– NiharAug 3, 2017 at 7:53
Yes, actually the picklist value should be updated on detail page.– Salesforce LearnerAug 3, 2017 at 8:33
Display picklist value as per the lookup field is not so possible by the validation rule but if you need to restrict the picklist value then yes you can do by the following piece of code,
If another Custom lookup Field's value (say Book__c) includes the keyword 'History', only Plan B and Plan C values display
You can set your validation rule something like this :
AND(Book__c = 'History' , ISPICKVAL( Picklist_Field__c , 'Plan A'))
Hope it helps you out !!