You need to sign in to do that
Don't have an account?
System Admin 949
Make a Picklist Field Read Only based on another Object Picklist Value
Hi All,
I have two objects one Customer and Quote.Customer is the Parent and Quote is Child.I have a picklist field in Customer i.e. Country it has some values like Ind,US,UK,Europe....etc.In Quote object also have picklist field called SalesType,it has some values.
My Scenario is when iam selecting the Country as 'Ind' in Customer object at that time the picklist field in Quote object as SalesType should be visible.if i select any picklist value in Customer except 'Ind' it should be read only .
how to achieve this??can any one suggest or provide some examples on this.
thanks in advance
I have two objects one Customer and Quote.Customer is the Parent and Quote is Child.I have a picklist field in Customer i.e. Country it has some values like Ind,US,UK,Europe....etc.In Quote object also have picklist field called SalesType,it has some values.
My Scenario is when iam selecting the Country as 'Ind' in Customer object at that time the picklist field in Quote object as SalesType should be visible.if i select any picklist value in Customer except 'Ind' it should be read only .
how to achieve this??can any one suggest or provide some examples on this.
thanks in advance
But you can controll the field editability with validation rules ..
You can do this using apex FieldPermission Setup Object and PermissionSet as Its only work on Permission set not on profile. Refer the below code.
Trigger Code:- Future Class
Thanks,
Nitish
thanks in advance
The Field ID you can get from Wrokbench. Run the below Query in Workbench in FieldPermissions Object.
PermissionSetID is the permission set through which you have given edit acces to that field to the user.
thanks
Other than that you can controll the field using Validation Rule.