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
Terry_0101Terry_0101 

Trigger: Update account field from custom object (lookup)

I have a custom object with a lookup relationship to accounts.

I need a trigger that updates an account field when a field from the custom object is populated with a value.
ManojjenaManojjena
Hi Samantha,

Ur post is not clear to give solution .What I understood is supose you have a custom object "AAA_c " which is the child of account .
IN the AAA_c you have two field A & B . If A value is there then you need to populate B value from account .

Correct me if I am wrong .
If this is the requirment you can achieve through formaula field and trigger .

Please confirm if my understanding is right .
Terry_0101Terry_0101
It's not a child, but lookup to accounts from custom object.

If Finance_Object_Type__c = Open

Then, Account.Finance_Object_Type__c = Open
Francois RouxFrancois Roux
Samantha,
I wondered if you ever got a solutuon to your post "Trigger: Update account field from custom object (lookup)" dated March 12, 2015. I have the exact same issue and I'm relatively new to Apex: I have a custom object with a lookup relationship to accounts, and need to update an account field when a field from a custom object is populated with a value.
Francois
Debbie MartinDebbie Martin
Samantha and Francois, I also need to update an account field when a field from a custom object is populated with a value.
Francois RouxFrancois Roux
Debbie,
You will find an answer by Akhil Anil to this issue on https://developer.salesforce.com/forums/ForumsMain?id=906F00000005FnbIAE
Kind regards,
Francois Roux