Skip to main content
I have a custom object called "Location". And have built a solution based on the requirements below. ................................................................................

 

Account, Contact and Location are all interconnected

 

An Account record is incomplete without creating a LINKED Location

 

Address – but a record can be created

 

A Location can only be created if it is LINKED to an Account

 

A Contact can only be created if it is LINKED to a Account

 

An Account can have multiple Location Addresses associated to it

 

A Contact can only have ONE Location Address

 

A Location Address cannot be seen as Unique – one postal address may be used by multiple Customers

 

................................................................................

 

The solution I've built so far has a lookup from Contact to Location, and in order to be able to have a many to many relationship between Accounts and Location, I have created a junction object called "Locaton Link".

 

When the user creates a new location record, they should be forced to create a location link record that associates the location to an account. Is there anyway of doing this decleratively, if not, what should I do?

 

At the moment I have used process builder to create a new record, but I'm a bit stuck from here as to what I should do next!
1 respuesta
  1. 20 oct 2016, 12:31
    Hi Glenn,

     

    If you want to enforce users to create a location link record everytime they create a location address, this can only be achieved either through a visualforce page or visual flow with screen elements as you cannot force users to have a child record created without the parent record creation.

     

    with visualforce or flow, you will have the users create both the records simuntaneously.

     

    Your Process builder solution works on creating a location link but how will the system to which account should the link be associated with, as part of the same process create an email alert action which will tell the users to complete the Account lookup field for the newly created link account.
0/9000