Skip to content

Instantly share code, notes, and snippets.

@madmax983
Last active December 19, 2017 22:02
Show Gist options
  • Save madmax983/96d77bfbb11f4fdaf0533861218fe280 to your computer and use it in GitHub Desktop.
Save madmax983/96d77bfbb11f4fdaf0533861218fe280 to your computer and use it in GitHub Desktop.
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:hasSobjectName" access="global" >
<lightning:recordEditForm recordId="{!v.recordId}" objectApiName="{!v.sObjectName}">
<lightning:messages />
<lightning:inputField fieldName="Name" />
<lightning:inputField fieldName="<INSERTNAMESPACEHERE>__LookupField__c" />
<lightning:button class="slds-m-top_small" variant="brand" type="submit" name="update" label="Update" onclick="{!c.handleClick}" />
</lightning:recordEditForm>
</aura:component>
({
handleClick : function(component, event, helper) {
var event = $A.get("e.force:refreshView");
event.fire();
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment