Creating an account for a company

0
I would like to make an account for a company as in when the account is created the company information is already there ect. My domain model goes as followed. One Company is associated with multiple Account(System.User)
asked
2 answers
0

You can either add a datagrid of accounts on the company form and use the association or create a dropdown/search form with companies on the account edit screen.

answered
0

'I have that but when I try to create an account I can`t edit the Company fields. As Administrator I want to create accounts with Company's. – Gabriel Kidane (2015-05-29)'

I thought your question was just how to display data from the Company on the Account record.

In order to create the two together, I would create a new non-persistable entity in your domain model that contains the information about the account and company in the same object, and use a microflow button to process the data entered :

  1. Check if the company already exists by doing a retrieve - if not create a new Company record
  2. Check if the Account already exists, and if not create a new Account record. Link the new or existing Account record to the new or existing Company record created in step one by setting the association.
  3. Close the (non-persistable entity) entry form, or clear the inputs to enter the next record.
answered