You need to sign in to do that
Don't have an account?
Display lightning form in modal after clicking on standard new button of contact
I am trying to display below lightning form in modal popup using overlay library. Please let me know how to do.
I have overrided below form with Contact New button. Thanks.
<aura:component implements="force:appHostable,lightning:actionOverride" access="global" >
<aura:attribute name="recordId" type="String" /> <lightning:overlayLibrary aura:id="popuplib"/>
<div class="slds-p-bottom_large slds-p-left_large" style="width:500px">
<lightning:recordEditForm objectApiName="Contact" onsuccess="{!c.handleSuccess}">
<lightning:messages />
<lightning:inputField fieldName="FirstName" />
<lightning:inputField fieldName="LastName" />
<lightning:inputField fieldName="Birthdate" />
<lightning:inputField fieldName="Phone" />
<lightning:button aura:id="submit" type="submit" label="Save record" class="slds-m-top_medium" />
</lightning:recordEditForm>
</div>
</aura:component>
Client side controller:
({
handleSuccess : function(component, event, helper) {
var contactRec = event.getParams().response;
var navEvt = $A.get("e.force:navigateToSObject");
navEvt.setParams({
"recordId": contactRec.id,
"slideDevName": "related"
});
navEvt.fire();
}
})
I have overrided below form with Contact New button. Thanks.
<aura:component implements="force:appHostable,lightning:actionOverride" access="global" >
<aura:attribute name="recordId" type="String" /> <lightning:overlayLibrary aura:id="popuplib"/>
<div class="slds-p-bottom_large slds-p-left_large" style="width:500px">
<lightning:recordEditForm objectApiName="Contact" onsuccess="{!c.handleSuccess}">
<lightning:messages />
<lightning:inputField fieldName="FirstName" />
<lightning:inputField fieldName="LastName" />
<lightning:inputField fieldName="Birthdate" />
<lightning:inputField fieldName="Phone" />
<lightning:button aura:id="submit" type="submit" label="Save record" class="slds-m-top_medium" />
</lightning:recordEditForm>
</div>
</aura:component>
Client side controller:
({
handleSuccess : function(component, event, helper) {
var contactRec = event.getParams().response;
var navEvt = $A.get("e.force:navigateToSObject");
navEvt.setParams({
"recordId": contactRec.id,
"slideDevName": "related"
});
navEvt.fire();
}
})
See if this fetches any help to you.
With Regards,
Protar https://plex.software/ https://tutuappx.com/ https://vidmate.onl/
<lightning:recordEditForm> is not perfect: https://success.salesforce.com/issues_view?id=a1p3A000000FmjRQAS
You need a calling component included into a Lex record page (important). You cannot test this code with a basic application.
A new component like below for a test and you need to put it on a record page ( (wheel) > Edit Page ) Its controller below creating the modal: $A.createComponent("c:ModalTest", {recordId:recId}, ModalTest: Controller of ModalTest :
Helper of ModalTest:
handleSubmit : function(component, event, helper) is complicated because of a the bug
https://success.salesforce.com/issues_view?id=a1p3A000000FmjRQAS
There are many alternatives with the modals (more or less components and/or dynamically created)
happy wheels (https://happywheels2.io)
offshore hosting (https://offshorededi.com/).
It worked.
Here I have collected a list of Best Instagram Captions (https://quotesology.com/instagram-captions/). Sassy Captions, Cool Captions, Love Captions, Funny Captions & Cute Captions for Instagram.
Offshore web hosting (https://offshorededicated.net/)
This information has been very difficult for me, thank you.
basketball legends fun (https://basketballlegends.fun)
Thanks, Very useful and informative. Keep posting
Rumblerum (https://www.rumblerum.com/)
Also. (https://best-microphones.com/)
Can we use multiple variables? , or we have to copy it exatly. (https://getmylaptop.com/)