You need to sign in to do that
Don't have an account?
tulasiram ch
How can we achieve this through?
1.trigger
2. Process Builder
How to perform updation like below scenario
- Account ==== Contact on contact Status__C field is there (Total 10 records)
How can we achieve this through?
1.trigger
2. Process Builder
- Account ==== Contact on contact Status__C field is there (Total 10 records)
finally, I solved your trigger problem and exception and complete requirement you just need to copy paste the code and your trigger is ready
Please don't forget to mark as best answer ....................................
Thank you
Avaneesh Singh
All Answers
for this requirement, you can use a trigger.
I didn't get your last line " But first Record Status__c would be Same(Approved). "
what you are trying to say.... give an example
Thank you
Avaneesh Singh
Suppose First record Status__c changed to Approved , then Only Remaining 9 records Status__c will be changed to Declined not 10 records.
Record 1 : Status__c = approved
Record 2-10 : Status__c = Declined.
How can we achieve through Trigger. Can you give me a code please.
okay i am writing a trigger for you just give me few minutes
Thank you
I did your requirement and this trigger is working fine in my org
here you need a picklist in contact name status__c and value of picklist are Approved and Declined
make sure spelling are correct
Cheers send me two beer's and don't forget to mark as best answer ----------------
Thank you
Avaneesh Singh
Let me know if still you are facing any problem.you just have to copy and paste the code
Thank you
Avaneesh Singh
1.If i inserted 9 records with Status__c == null, when i tried to insert 10th record with Status__c==Approved then only remaining 9 records Status__c==Declined
2. i inserted 10 records, then i updated one record from Status__c == Approved then only remaining 9 records status__c would be Declined.
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger updateApprovedandDeclined caused an unexpected exception, contact your administrator: updateApprovedandDeclined: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.updateApprovedandDeclined: line 8, column 1
The error you are facing related to null pointer is, you are trying to perform dot operation on a null object. Can you share your code so that it would be easier to point out the issue.
finally, I solved your trigger problem and exception and complete requirement you just need to copy paste the code and your trigger is ready
Please don't forget to mark as best answer ....................................
Thank you
Avaneesh Singh
Do changes in Avaneesh code as below from line 14 to 21
You dont need to create new Contact objec.
Thanks,
Sukanya Banekar