Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component implements="force:hasRecordId,lightning:actionOverride" access="global">
- <aura:registerEvent name="customEvent" type="c:customEvent"/>
- <lightning:recordEditForm objectApiName="MyObject__c"
- onload="{!c.handleLoad}" onsubmit="{!c.handleSubmit}" onsuccess="{!c.handleSuccess}" onerror="{!c.handleError}">
- <lightning:messages />
- <div class="slds-p-around_small">
- <lightning:inputField fieldName="Name"/>
- <lightning:inputField fieldName="Field1__c"/>
- <lightning:inputField fieldName="Field2__c"/>
- <lightning:inputField fieldName="MasterDetail__c" value="{!v.recordId}"/>
- <div class="slds-m-top_medium">
- <lightning:button variant="brand" type="submit" name="save" label="Save" />
- </div>
- </div>
- </lightning:recordEditForm>
- </aura:component>
- handleLoad : function(component, event, helper) {
- },
- handleSubmit: function(component, event, helper) {
- },
- handleSuccess: function(component, event, helper) {
- var fireEvent = $A.get("e.c:customEvent");
- fireEvent.fire();
- },
- handleError: function(component, event, helper, error){
- }
Add Comment
Please, Sign In to add comment