You need to sign in to do that
Don't have an account?
Quanchi
Apex Code for Trigger Help
Hello,
If you can help point me in the right direction, it would be a great help.
I need an Apex Trigger that updates opportunity #1 custom field #1 with the opportunity ID from Opportunity #2 when Opportunity #2 custom field #2 (lookup field for opportunity name) is populated with opportunity #1's ID. Hope this makes sense.
Thanks,
Quanchi
Have you taken into account that two different Opportunities might point to the same opportunity #1 ?
In that case, which ID would you store in #1 ?
That is a possiblity, but what were are doing is we could have a max of 2 opportunities associated with each other and we want it to automatically update the 2 opportunity when the first opportunity is associated with the other.
it would be something similar to ..
I haven't check the syntax nor its functionality, but might be something similar to that.
Regards
Thanks, this is a great start. I am not good with syntax yet....I will keep trying.