Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component implements="force:appHostable">
- <aura:attribute name="recordId" type="String" />
- <lightning:card title="Create Reservation">
- <lightning:recordEditForm
- onsuccess="{!c.handleSuccess}"
- objectApiName="Campsite_Reservation__c">
- <!-- the messages component is for error messages -->
- <lightning:messages />
- <lightning:inputField fieldName="Campsite__c" value="a041o00000ZWoFbAAL"/>
- <lightning:inputField fieldName="Reference__c"/>
- <div class="slds-m-top_medium">
- <lightning:button variant="brand" type="submit" name="save" label="Save" />
- </div>
- </lightning:recordEditForm>
- </lightning:card>
- ({
- handleSuccess: function(cmp, event, helper) {
- var params = event.getParams();
- cmp.set('v.recordId', params.response.id);
- }
Add Comment
Please, Sign In to add comment