1

I am trying to create URL List button so that I can add it to the related list to auto select record type when button is clicked. But every time it is selecting default record-type no matter which id I pass. below is my URL code

one/one.app#/sObject/temp__c/new?RecordType=012r00000005yDf

2 Answers 2

2

I don't think it is possible in Lightning. As an alternative, you can use a Quick Action in Parent Object instead of the New Button in Related List.

Create a Quick Action for the child objct in the Parent Object. Here Model is my Parent object and Device is the child object.

enter image description here

Add the Quick Action on the Parent Object Page Layout. Remove the New Button from Related List and force User to use the Quick Action Instead. This will open the Record Create page of the child object with the preselected Record Type.

enter image description here

-1

Try recordTypeId=012r00000005yDf instead of RecordType=012r00000005yDf. This should work if you want to use a custom button instead of a quick action.

2
  • This answer is missing explanation about how this should make a difference. Salesforce, in general, is case-insensitive.
    – Derek F
    Commented Sep 23, 2020 at 16:40
  • @DerekF, there's more than a case adjustment there (though I agree that some explanation would be valuable). In my case I'm already using the suggested key name.
    – isherwood
    Commented Sep 23, 2020 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .