You need to sign in to do that
Don't have an account?
erikvm
Customize the "$A.get("event.force:createRecord")" modal?
I've got a lightning component that lets the user submit a record. Once they hit submit, the standard page for creating the record pops up, which looks like this:
Is it possible to customize this modal to only display certain things? I'd like it to look like a confirmation page (as they have entered the information for each field in a previous component), something along the lines of
"You entered:
Date xx
Dealer: YY
Press save to confirm"
Here's the code for that modal popup:
loadSalesAppointment: function(component, event, helper, customerAccountId) { var event = $A.get("event.force:createRecord"); if (event) { event.setParams({ entityApiName: "Sales_Appointment__c", defaultFieldValues: { Resource__c: component.get("v.resourceId"), Dealership__c: component.get("v.accountId"), Lead__c: component.get("v.customerAccountId"), Start__c : StartDateAndTime, End__c : EndDateAndTime } }) event.fire(); } else { alert("Not available") } },
You can try using overlay library and display body whatever details you have mentioned and then may be use Lightning Data Service to submit the record? - you might need to create object with the default values to be used by data service, please check the links below
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_lightning_overlayLibrary.htm
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service.htm?search_text=Lightning%20Data%20Service
Thanks