I created a custom object called Meeting where I have three record types. Each record type is a type of Meeting: Meeting 1, Meeting 2, and Meeting 3. I also created a child object called Event Attendees that also has three record types: Meeting 1,Meeting 2,Meeting 3.When a new Event attendee record is created off of any one of the parent record types (such as Meeting1), I would like the child record type field on the Select Record Type page to default to its corresponding parent record type (such as Meeting 1) so the users don’t have to worry about selecting the right attendee record type. If the user selects the wrong record type, they won’t have the right fields to enter the needed information. The only place users can access the attendee related list is from the parent record.

How do I set the record type of a custom child object based on parent record type

I know there are two options like url hack on related list new button or overriding new button with visualforce page.

Is there any other way to acheive this ?

  • 3
    Yes, using actions. Feel free to read my blog post about it: absi.be/why-the-heck-url-hacking-salesforce – Robin De Bondt Aug 18 '16 at 14:06
  • @Robin De Bondt Can you post this as answer – sfdc Aug 18 '16 at 14:17
  • 2
    @RobinDeBondt - If you post it as an answer make sure you add the content around it sufficient to answer the question like the link did not exist. Link only answers are not allowed here – Eric Aug 18 '16 at 14:30

Best way to do this would be to create Object-Specific Quick Actions.

In your case, you would create 3 "Create a Record" actions, which will create an Event Attendee record with one of the three 3 record types. Since you have 3 record types on your parent Meeting object as well, you can assign 3 different page layouts. On each of the page layouts, only display the relevant action.

You can find more information and a step-by-step guide on a recent blog post of mine.

Not the answer you're looking for? Browse other questions tagged or ask your own question.