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
MayankDkPantMayankDkPant 

Custom Role Validation

Hi All,

 

I have Parent account and child account. Contacts can only be added to parent account and contact roles to child account. Contact and contact role related list has to be shown on parent and child account. When user clicks on new button in contact role related list  in the parent account, I want to restrict user from adding contact role for the parent account.

 

Is there any validation possible like we have for contact. Any help will be greatly appreciated. I want to do it through customization only.

 

Thanks in advance.


With Regards,

Mayank Pant

Santosh KumbarSantosh Kumbar

looks no way to achive this on just configuration.

 

You can write a trigger on "AccountContactRole" object that check the realted  account is Parent or not.

 

 

 

Regards

Santosh

www.santoshkumbar.com

MayankDkPantMayankDkPant

But as per my knowledge we can not write trigger for child object and AccountContactRole is a child object of Account. Can you suggest me how to do this.

 

Thanks.

 

With Regards,

Mayank Pant

Santosh KumbarSantosh Kumbar

 

 

oh then its a problem....i didnt know that salesforce doesnt provide trigger on "AccountContactRole". 

 

It seems, there are lot of discussion is going for the same issue. 

http://boards.developerforce.com/t5/Apex-Code-Development/Account-Trigger-on-Account-Contact-Role-Change/td-p/366223

 

Regards

Santosh