[SalesForce] Can you set a default value to a lookup field based upon Record Type

Can you set a default value to a lookup field based upon Record Type?

Essentially I have an Object, "Call". This is related to another custom object "Call Type". I have created Record Types on Call which determine the fields displayed to user. The Record Types directly relate to "Call Type" records so I would like to either:

  • Automatically assign a value to the Call Type based upon Record Type selection?
  • Select the Record Type based upon Call Type selection?

I think I did a render test using a VisualForce, could this be applied to the second option to filter the fields displayed to the user (sounds like more work).

FYI – screenshot of end result process builder http://awesomescreenshot.com/0105bvpv9d

Best Answer

I believe you can use process builder to set the association.

Create a field on the call type to hold the record type that the record will be used for

then use process builder to update the call lookup field based on the record type of the call and the associated call type....

Per your comment here is how you did it:

set the Call Object to execute on record create the action an "Update Record" action. I associated this to call, then set the criteria for updating records to filter based upon the Record Type ID (you need the 18char ID) followed by the final part which sets the Call Type field ID value as necessary

Related Topic