You need to sign in to do that
Don't have an account?
Rohan S
Want to create a roll up summary in a look-up relationship
On Account object I want a field (NumberOfContacts__c) to show the number of associated child Contacts. Can someone please help me with the Apex Class for this trigger which should work in all DML operations such as Create, Update, Delete and UnDelete? Thanks in advance.
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Trigger:
Handler Class:
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
All Answers
In Trigger you should use operations and trigger should be in Contact object.
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please Mark this as solution if your problem resolved.
Appreciate your response, but I need someone to help me with the Apex class for this requirement.
Thanks
Please refer this code accordingly you can make changes Trigger
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please Mark this as solution if your problem resolved.
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Trigger:
Handler Class:
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