+ Start a Discussion

three-level objects and info sharing

I have created a custom object under Opportunity, called Rev. When someone creates a new Opportunity and saves it, they then create a Rev object. However, while the account is auto-populated to the Opportunity, I have to ask the users to re-enter the Account info when they are creating a Rev object. This is necessary because I had to have a look-up relationship, so that the Rev objects would show up in a related list on teh Account detail page.


Is there an easy way to auto-pop the account into the Rev object?

Shivanath DevnarayananShivanath Devnarayanan

As far as I've understood, you need to populate the lookup field on your Rev object with the same account on its opportunity.


 if you have the option to write apex triggers, you could write a trigger on REV object and populate it with the Account Id from opportunity

Since you cannot update a lookup via workflow actions..


Do let me know if you need a psuedo code or more help in solving this.



I'm writing an Apex trigger now -- I'll let you know how it works! Thanks!