You need to sign in to do that
Don't have an account?
Sriram Varma 1
Triggers apex
Create a custom field called number in account in that field if we enter 5 then automatically 5 records should create in contact using apex trigger.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
What is the business use case you are trying to achieve?What should be the 5 contact details if the number entered in account is 5.
The code in https://salesforce.stackexchange.com/questions/27241/write-a-trigger-that-automatically-create-a-contact-when-account-is-created is about a trigger that automatically creates a contact when the account is created and should help you get started.
If this information helps, please mark the answer as best.Thank you
Try The Following Code If It Helps Please Mark It As Best Answer.
Thank You!
Hi Sriram Varma,
Here is the solution of your question
If this information helps, please mark the answer as best,so that other can take refernce from here.
You can use the below piece of code. I have also tested it in my org.
Trigger: Apex Class:
I hope you find the above solution helpful. If it does, please mark it as the Best Answer to help others too.
Thanks and Regards,
Sachin Arora
www.sachinsf.com