You need to sign in to do that
Don't have an account?
Ritesh001
Trigger to restrict user from creating not more than 1 contact per account using controller
Can someone suggest a trigger using the controller? So user cant create more than 1 contacts per account using apex controller
Try this:
Handler Class:
Trigger:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Regards,
Khan Anas
All Answers
Greetings to you!
Below is the sample code which I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
I had done with a trigger. But I was wanted to do the same using the Apex controller and trigger.
Try this:
Handler Class:
Trigger:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Regards,
Khan Anas