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
whatever513whatever513 

Want to link Tabs to auto-populate/autopopulate fields

I am in the process of trying to set up some tabs for my company to use for their database and am wondering if it is possible to have information from one tab auto-populate information in another tab. Here's basically what I'm talking about:

 

I have created a Tab called Management Companies and set up all my necessary fields. We are also going to be using the Accounts tab and there would be a link between this tab and the Management Companies one. I am trying to see if there is a way that, once a company has been added to the Management Companies section, once I type in their name on the Accounts tab that the rest of their corresponding fields (Address, Phone number, etc) would be auto-populated instead of having to retype their information. This would also help ensure that the Management Company information is consistent and the Accounts get linked properly. Anyone have any idea how I can set this up? Any help is appreciated.

waylonatcimwaylonatcim

Not sure if I'm completely following you but it seems like you can just make the corresponding fields on the management company object formula fields that would just pull their information from the relevant fields on the Account object.  That way, the information is read-only on the management companies tab and would be consistent with the corresonding account object.

whatever513whatever513

Thank you for the response but I think you might have what I need backwards. Basically the information for the Management Company would be input first on the Management Company Tab I created. Next I would go to the Accounts Tab and create the Accounts that would belong to a particular Management Company. What I wanted to try and do is make it so that when I am filling out the information on the Account tab, when I go to input the Management Company information, it would auto-populate the information of the Management Company once I get their name in.

waylonatcimwaylonatcim

Ok, in this situation you could create a trigger that would fire when a new account was created.  The trigger can check to see if there is a link between the account and the management company, and if so automatically populate the account fields with the management companies corresponding information. 

 

Alternatively, the only way that I could think of having the information automatically populated as soon as you select the management company in the new account create screen would be to override the new account page with a custom visualforce page and trigger an event when the management company is selected, that would populate the corresponding fields using ajax and partial page refreshes.  This is obviously a lot more work then the trigger mentioned above.

 

I'm not sure if there are any other suggestions that anyone else has that might be a better solution to this.