You need to sign in to do that
Don't have an account?
Sid Lightning
Update child object field from another child object field by apex trigger ?
Hi,
I have an order object, it has 2 childs, NPS and Cases
On NPS, I have a lookup to cases. but both gets filled seperately
What I really want is, When NPS rating is "4" on NPS. It should set the status close on all cases with "Type" NPS 4
Point to remember is there can be multiple cases with this type
NPS rating --- > 4
Cases - type -(NPS4) ---- > Status = Closed
Can somebody help me in writting trigger and test class for the same
I have an order object, it has 2 childs, NPS and Cases
On NPS, I have a lookup to cases. but both gets filled seperately
What I really want is, When NPS rating is "4" on NPS. It should set the status close on all cases with "Type" NPS 4
Point to remember is there can be multiple cases with this type
NPS rating --- > 4
Cases - type -(NPS4) ---- > Status = Closed
Can somebody help me in writting trigger and test class for the same
Please Clear some points.
What I understood is : When NPS is insert/update with rating 4 then all cases with type (NPS4) [What is type - NPS4 ? Is it field or record type on Cases ? ] related to that NPS should be upadted with status = closed.
Let me know.
Thanks,
Foram Rana