Skip to main content
Question Protected by CommunityBot
Tweeted twitter.com/StackSalesforce/status/1259589052241674243
deleted 54 characters in body
Source Link
battery.cord
  • 8.9k
  • 8
  • 32
  • 59

We have about three different record types for a custom object, for which I am trying to create a lightning component that will override the standard behaviour. In lightning experience, we are presented with the "Record Type selection screen" as shown below.

Record Type Selection Screen

Once we select a record type the lightning component shows up however I am unable to find any standard way to get the recordTypeId from the previous selection window.

It is available in the url as /new?recordTypeId=012360000008N3z&additionalParams.../new?recordTypeId=012360000008N3z&additionalParams....

My question is regarding any standard technique for getting the record type Id. Maybe, something similar to force:hasRecordIdforce:hasRecordId interface like force:hasRecordTypeIdforce:hasRecordTypeId.

I have looked through the lightning documentation to no avail and I might have to fallback to URL parsing. Any help would be much appreciated.

<!-- My Component implements the following interface -->
<aura:component implements="force:hasRecordId,lightning:actionOverride">
 ...
</aura:component>

Thanks in advance

We have about three different record types for a custom object, for which I am trying to create a lightning component that will override the standard behaviour. In lightning experience, we are presented with the "Record Type selection screen" as shown below.

Record Type Selection Screen

Once we select a record type the lightning component shows up however I am unable to find any standard way to get the recordTypeId from the previous selection window.

It is available in the url as /new?recordTypeId=012360000008N3z&additionalParams....

My question is regarding any standard technique for getting the record type Id. Maybe, something similar to force:hasRecordId interface like force:hasRecordTypeId.

I have looked through the lightning documentation to no avail and I might have to fallback to URL parsing. Any help would be much appreciated.

<!-- My Component implements the following interface -->
<aura:component implements="force:hasRecordId,lightning:actionOverride">
 ...
</aura:component>

Thanks in advance

We have about three different record types for a custom object, for which I am trying to create a lightning component that will override the standard behaviour. In lightning experience, we are presented with the "Record Type selection screen" as shown below.

Record Type Selection Screen

Once we select a record type the lightning component shows up however I am unable to find any standard way to get the recordTypeId from the previous selection window.

It is available in the url as /new?recordTypeId=012360000008N3z&additionalParams....

My question is regarding any standard technique for getting the record type Id. Maybe, something similar to force:hasRecordId interface like force:hasRecordTypeId.

I have looked through the lightning documentation to no avail and I might have to fallback to URL parsing.

<!-- My Component implements the following interface -->
<aura:component implements="force:hasRecordId,lightning:actionOverride">
 ...
</aura:component>
Source Link
Learner
  • 460
  • 1
  • 4
  • 11

Getting RecordTypeId selected from 'Record Type Selection' Page, in a lightning component that overrides create screen

We have about three different record types for a custom object, for which I am trying to create a lightning component that will override the standard behaviour. In lightning experience, we are presented with the "Record Type selection screen" as shown below.

Record Type Selection Screen

Once we select a record type the lightning component shows up however I am unable to find any standard way to get the recordTypeId from the previous selection window.

It is available in the url as /new?recordTypeId=012360000008N3z&additionalParams....

My question is regarding any standard technique for getting the record type Id. Maybe, something similar to force:hasRecordId interface like force:hasRecordTypeId.

I have looked through the lightning documentation to no avail and I might have to fallback to URL parsing. Any help would be much appreciated.

<!-- My Component implements the following interface -->
<aura:component implements="force:hasRecordId,lightning:actionOverride">
 ...
</aura:component>

Thanks in advance