You need to sign in to do that
Don't have an account?
snehil kumar
Please help me to write the trigger for my requirements.
Hi All,
I have posted my requirements, please help me to write the trigger Thanks in Advance.
Create a field in Account => NumOfContact__c
This field should be a pick list. Values - 1,2,3,4,5
This field value should be same as the number of contacts in the related list.
Thanks for your response,I have also done the same things.but the requirements is different.
Explanation of requirements: There is a picklict field on Account, when we select the value from picklist. it allows us to create the same number of record on contact side.
Greeting!
Custom Field should be number type, not a Piclist because it takes an integer value of account child means NumOfContact__c value.
You can use this Code: If you find your Solution then mark this as the best answer.
Thank you!
Regards
Suraj Tripathi
Try Below Code Please Mark It As Best Answer If It Helps
Thank You!
You can take reference from this below code:-
In case you find any other issue please mention.
If you find your Solution then mark this as the best answer.
@Suraj
Thanks again for your response.
Could you please help me to write the same trigger with best practice.
Please take reference from this below trigger code with best practise and also this trigger fulfil your requirements. In case you find any other issue please mention.
If you find your Solution then mark this as the best answer.