<aura:component access="global" implements="force:hasRecordId,lightning:actionOverride,lightning:hasPageReference"> <aura:html tag="style"> .slds-modal.slds-fade-in-open.cAccountNewCmp .slds-modal__container{ width: 99%; max-width: 95rem; padding:0.5rem; display: block; } .siteforcePanelsContainer .panel.slds-modal.slds-fade-in-open .slds-modal__container{ width: 99%; max-width: 95rem; padding:0.5rem; display: block; } </aura:html> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <aura:handler name="change" value="{!v.pageReference}" action="{!c.reInit}" /> <aura:attribute name="recordId" type="String" /> <aura:attribute name="selectedRecordId" type="String" /> <aura:attribute name="isRecordTypeSelectionVisible" type="Boolean" default="true" /> <div aura:id="editDialog" role="dialog" tabindex="-1" aria-labelledby="header43" class="slds-modal slds-fade-in-open"> <div class="slds-modal__container"> <div class="slds-modal__content slds-p-around--medium slds-grid slds-wrap" style="display:block;height:91vh;"> <c:accountNewLwc recordId="{!v.recordId}" accountType="new" recordTypeValue="{!v.selectedRecordId}"> </c:accountNewLwc> </div> </div> </div> <div aura:id="overlay" class="slds-backdrop slds-backdrop--open"></div> </aura:component>
({ doInit: function(component, event, helper) { var recordTypeId = component.get("v.pageReference").state.recordTypeId; console.log(recordTypeId); component.set("v.selectedRecordId", recordTypeId); }, reInit: function(component, event, helper) { $A.get("e.force:refreshView").fire(); }, })