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)
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.
Chris de Gelder
'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 :
Check if the company already exists by doing a retrieve - if not create a new Company record
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.
Close the (non-persistable entity) entry form, or clear the inputs to enter the next record.