You need to sign in to do that
Don't have an account?

who to write trigger for this? can anyone help me?
Create a field on Account Object Number of contacts Write a trigger to create the number of contacts which are equal to the number which we will enter in the Number of Contacts field on the account object
Eg: if we enter No.of Contacts = 4, we need to create 4 contacts, then if we are changing it from 4-5, then it should have only 5 contacts
Eg: if we enter No.of Contacts = 4, we need to create 4 contacts, then if we are changing it from 4-5, then it should have only 5 contacts
Please Try the below code and let me know if this works for you. If still need modifications do let me know.
Trigger : Class :
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
All Answers
Try the following code it may be helpful for you:
Trigger: I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
Please Try the below code and let me know if this works for you. If still need modifications do let me know.
Trigger : Class :
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
The coding is working perfectly.,
Thank You So Much for your help.,
Yours,
Sriram.R
the coding working properly., but..,
its in account object we having 3 records.,
& each account record updating time, its creating contacts records
& 1st record for we updating the no.of.contact field box as 2 in account object, so its 2 records creating in contacts record.,
& 3 account records for we updating in the no.of.contact field as 2, so its 6 records totally of in contacts record.,
& if again we update the 1st account record means then its deleting its contacts 2 records & updating new 2 records.,
its nor deleting all records in contact field., which other 2 account records created.,
.....
you have solution for it?
Yours,
Sriram.R