You need to sign in to do that
Don't have an account?

Set a value for 2 dependent picklists
I need to update/change my Customer Type picklist field with the value of Detail Customer before I insert the Account. So the process is like this:
1) I press the new button for creating new account
2) Those 2 fields appear on the screen
3) When I select Customer Main Type picklist field with the value of Organization the Customer Type default value should be Detail Customer, and it should change instantly before I inserting my account. Remember, these two picklists are dependent and not controlling picklists.
I tried to write a trigger but I'm stuck here.. I'm not a programmer so I don't know how to continue this.
trigger ChangeValue on Account (before insert) {
for (Account a : Trigger.new){
if(a.CustomerMainType__c =='Organization'){
a.CustomerType__c == 'Detail Customer';
}
}
}
I have 2 errors: Variable does not exist: CustomerMainType__c ; Variable does not exist: CustomerType__c.
And the fields should be like this when i select the Organization value.
sorry for this issue you are facing.
May I suggest you please refer to below link from the success community with a similar discussion and a suggested workaround.
- https://success.salesforce.com/ANSWERS?id=9063A000000DwUXQA0
Hope this helps.Kindly close this thread by marking it as solved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra