I'm trying to overrides the standard 'New' action on one of my custom object.
First of all, as you can see from the above picture, the 'Skip Record Type Selection Page' checkbox doesn't seem to work. When I uncheck this checkbox, I still have a visualforce page asking to select a record type. The weirder part is that the standard Lightning record type selection is replaced by a Visualforce page. See the below picture.
On the other hand, it's impossible to get the record type which was selected previously. Whereas the selected record type id appears on the url like this: https://lgc-bfl--dev2.lightning.force.com/one/one.app#/sObject/LGC_Ligne_bordereau__c/new?recordTypeId=0129E00000008zP
.
I tried to declare it as attribute:
<aura:attribute name="recordTypeId" type="String" />
Then access it from my controller:
console.log(component.get("v.recordTypeId"));
But the attribute is undefined.
How am I supposed to know which record type was selected? If this is not possible, why can't I remove the record type selection and handle it myself?
var currentUrl = window.location;
and see if you can extract recordId from thereSkip Record Type Selection Page
. regarding the recordTypeId attribute - why do you think this would be populated? I cannot find any documentation about that