You need to sign in to do that
Don't have an account?
rossco
Trigger to update Parent record based on concatenation of child record
Hi
I want to write a trigger (before insert and after update) to set a single field on the Account record which is the concatentation of a field from many child records (from ERP_Account).
For exmaple: if the ACCOUNT record has many ERP_Accounts with the value in field ACCOUNTNO as 'TEST1','TEST2','TEST3' respectively, then I want to set ACCOUNTNOS field in the Account record with the value 'TEST1, TEST2, TEST3,'
Dont know where to start - any help would be greatly appreciated.
Thanks
Ross
Hi Rossco,
I had a quick think, see below my idea of how to solve your problem.
Let me know if you have any issues.
Peter
Were you able to get this to work? I need to write a similar trigger and I have no clue how to write one.
No, Im still struggling! Any code would be greatly appreciated
Below is some code to put you in the right direction. I may have made some little mistakes, as I did it quickly in notepad. If ERP_Account is a custom object append '__c' and
Best of luck,
Peter
Hi Peter I am trying to mimic u r code for my requirement. My Parent Object is Opportunity and its child is Big Machine Quotes. It has to run in Batch . If status field on Big Machine Quote contains Unison then Opportunity Stage changes to Closed Won.
Kindly help. Here is my following code.
Any help is appreciated