function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jagadeesh AdaveniJagadeesh Adaveni 

Can anybody give answer for this?

Hi All,

I have 3 objects called A,B,C and I have to write trigger on C and i want to update object A field i.e.,Balance__C fileld with Object B filed of TotalAmount__c (B is child of A and C id Child of B). How can i achieve this please give a code for this Thanks in Advance..

Regards
A.Jagadeesh
Scott_VSScott_VS
Can you provide more specifics? Which objects are you using?
Jagadeesh AdaveniJagadeesh Adaveni
Hi Scott_Vs this is my req spec

1.Invoice(Custom Obj)
   fields:Invoice Number
      Invoice Date
      Account(Lookup Account)
      Invoice Amount(Rollup summary sum of all items price filed of                  'Invoice Line Items' obj)
2.Invoice_Line_Items(Obj)
   
   fields:Invoice(M-D relation with Invoice)
         Unit price
      quantity
         Totalprice(quantity*unit price)

3.Create custom field called Account Balance on aCCOUnt obj and write trigger on Invoice Line Items to update account balance as sum of all associatedinvoices.