You need to sign in to do that
Don't have an account?

Automatically choosing the correct record type based on related object
Hi Everyone! I tried searching within the forum and sadly couldn’t find a new solution to my problem (I found a similar issue from a few years ago but the solution was to build a Oneclick Java button and sadly these aren’t support in Lightning).
I would like to add a new button to my related list that creates a new record that is based on the object record type. For example:
Object A record type A: Button creates a new record for Object B record type A
Object A record type B: Button creates a new record for Object B record type B.
It is important that both record types are available for the user so setting a standard record type is not an option. Any suggestions?
I would like to add a new button to my related list that creates a new record that is based on the object record type. For example:
Object A record type A: Button creates a new record for Object B record type A
Object A record type B: Button creates a new record for Object B record type B.
It is important that both record types are available for the user so setting a standard record type is not an option. Any suggestions?
For example
/lightning/o/Custom__c/new?recordTypeId=0127F000000NVxPQAW
Will open a new record window with the specified record type already set. You can even store the id in a custom setting if you don't want to hardcode it in the button.
You can read more about "URL hacking" here (https://salesforceben.com/salesforce-url-hacking-for-lightning-tutorial/)