I'm trying get accountId with lightning component. I developed custom controller,controller.js and component. Everything looks true but I have error and it doesnt work. Error is:
Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. Action failed: forceChatter:lightningComponent$controller$doInit [Error while creating content for lightning component quick action] quickActionHandlerHelper.js failed to create component - forceChatter:lightningComponent
This is my component
<aura:component controller="GetAccountController" implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global">
<aura:handler name="init" action="{!c.doInit}" value="{!this}" access="global" />
</aura:component>
This is my custom contorller
global with sharing class GetAccountController {
@AuraEnabled
global static void setAccountId(Id actId) {
try{
Account ac = new Account(ID=actId,Site=actID);
update ac;
}
catch(Exception e){
System.debug(e.getMessage());
}
}
}
This is my controller.js
({
doInit : function(component, event, helper) {
var artId = component.get("v.actId");
console.log(artId);
action.setParams({
"artId":artId
});
// Queue this action to send to the server
$A.enqueueAction(action);
}
})
and this is my helper.js
({
helperMethod : function() {
}
})