I am trying to add global action on my lightning component I have embedded my component to contact detail lightning page but I am a getting the below error
Please find the code below :
Component
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" controller="LightningContactController" access="global" >
<aura:handler name="init" action="{!c.getContactList}" value="{!this}"/>
<aura:attribute name="ContactList" type="List"/>
<lightning:card title="Contacts" >
<p class="slds-p-horozintal_small">
<aura:iteration items="{!v.ContactList}" var="contact">
<lightning:recordViewForm recordId="{!contact.Id}" objectApiName="Contact">
<div class="slds-box slds-theme_default">
<lightning:outputfield fieldName="Name"/>
<lightning:outputfield fieldName="Phone"/>
<lightning:outputfield fieldName="Email"/>
</div>
</lightning:recordViewForm>
<br/>
</aura:iteration>
</p>
<aura:set attribute="actions">
<lightning:button label="New" onclick="{!c.newContact}"/>
</aura:set>
</lightning:card>
</aura:component>
................................................................................
Controller.js
({
getContactList : function(component, event, helper) {
helper.fatchcontects(component, event, helper);
},
newContact: function(component, event, helper){
var createContact= $A.get("e.force:createRecord");
createContact.setParams({
'entityApiName':'Contact',
'deFaultFiedlValues' : {
'AccountId': componet.get("v.recordId")
}
});
createContact.fire();
}
})