I have a requirement. To show a pop up on button click. The pop up will show some fields suppose Account.Name etc etc. The fields will be editable. the pop up will have a submit and a cancel button also. Please help me on the approach with a sample code.
Here you go example code , edit button <lightning:buttonIcon iconName="utility:edit" class="slds-col_bump-left" variant="bare" alternativeText="Edit Record" onclick="{!c.editRecord}" />
In controller fire edit record event . editRecord : function(component, event, helper) { var editRecordEvent = $A.get("e.force:editRecord"); editRecordEvent.setParams({ "recordId": component.get("v.propertyId") }); editRecordEvent.fire(); }
More detailed info look into part5 & 6 in below trailhead project. https://trailhead.salesforce.com/projects/workshop-lightning-programmatic/steps/programmatic-step-5
Thanks for this but what I am looking for is a VF page with extension OR if that can be executed with Javascript. I am working in SF classic not lightning. Will you be able to provide a sample code on that please. Thanks again for your answer.
<lightning:buttonIcon iconName="utility:edit" class="slds-col_bump-left" variant="bare" alternativeText="Edit Record" onclick="{!c.editRecord}" />
In controller fire edit record event .
editRecord : function(component, event, helper) {
var editRecordEvent = $A.get("e.force:editRecord");
editRecordEvent.setParams({
"recordId": component.get("v.propertyId")
});
editRecordEvent.fire();
}
More detailed info look into part5 & 6 in below trailhead project.
https://trailhead.salesforce.com/projects/workshop-lightning-programmatic/steps/programmatic-step-5
Thanks
Suresh
Thanks for this but what I am looking for is a VF page with extension OR if that can be executed with Javascript. I am working in SF classic not lightning. Will you be able to provide a sample code on that please. Thanks again for your answer.
Regards,
Abhiraj