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
MWilliamMWilliam 

Formula to Look Up an Account ID , on a Contact record, in a Custom Object.

Please assist:  I have created a Custom Object called Complaints.  It has a Master/Look Up Relationship to Account.  I have also added a basic Look Up Relationship to Contact, so the Complaints will show for the Account, as well as on a Contact, and Complaints can be recorded on either level. 

 

Here is my issue: When a Compliant is entered from an Account it works as expected and populates the Account field (Master/Look Up ID) as it should.  When a Complaint is entered from a Contact, obviously the Master/Look Up, Account is not populated. 

 

What I would like to be able to do is the following: Create a formula to look up the Account ID from the Contact record that the Complaint is being entered on and return that value (Account ID) to the Complaint record as the Account (Master/Look Up) value.  This would take care of linking the Complaint correctly across both Account and Contact objects.

 

I would greately appreciate help as I haven't been able to loacate how to do this.

MSheridanMSheridan
I would create a button on the Complaints object using Onclick javascript. Once complete, add this to the complaints related list under the contact object and remove "new". (don't override the new button, just replace with this button on the contact object related list)