You need to sign in to do that
Don't have an account?
Vigneshwaran Loganathan
Validation rule help --
Hi, I need to write a valdation rule for below scenario,
Two Objects -- Eg, Accounts and Contacts. Contacts has a picklist called "Type" (values - 'Business' , 'Professional')..
I have a vf page where i can enter Account details, (multiple)Contacts and save all at one go.. Now the requirement is, if I save more than one contact, Type should be same - means, it should be either Bussiness or Professional for all contacts..
Is it possible to achieve this using ONLY vaidation rule (i cant write trigger for some reasons).?
Two Objects -- Eg, Accounts and Contacts. Contacts has a picklist called "Type" (values - 'Business' , 'Professional')..
I have a vf page where i can enter Account details, (multiple)Contacts and save all at one go.. Now the requirement is, if I save more than one contact, Type should be same - means, it should be either Bussiness or Professional for all contacts..
Is it possible to achieve this using ONLY vaidation rule (i cant write trigger for some reasons).?
Validation rule works record wise and not on the buk records so you can't acheive this with validation rules. You can validate this scenario in the controller class of your VF page. Please let us know if you need any help with the code snippet.
Thanks,
Abhishek Bansal.
All Answers
Validation rule works record wise and not on the buk records so you can't acheive this with validation rules. You can validate this scenario in the controller class of your VF page. Please let us know if you need any help with the code snippet.
Thanks,
Abhishek Bansal.