You need to sign in to do that
Don't have an account?
Raphael Mazouz 6
How to export a lightning component into a managed package?
I have a lightning component that I created in my Developer Salesforce Account and I want to export my managed package to an another Salesforce Account.
I sucessed to create my managed package and install it in the other Salesforce Account (with also this component).
But the problem is :
When I am in the other Salesforce Account and I am adding a new Action with the option Lightning Component , it is writting me **Error: No Lightning Component Quick Actions are available for your organization.**
I tried to do it with an unmanaged package in the other Salesforce Account and it is working , so I think that the problem is related to the managed package
Can you help me with this problem
thanks you very much
The code of the component is here:
***DecryptService.cmp***
<aura:component controller="raphspace.EncryptionService" implements="force:lightningQuickAction,force:hasRecordId" >
<aura:attribute name="listOfValue" type="List" />
<aura:handler name="init" value="{!this}" action="{!c.init}"/>
<aura:iteration items="{!v.listOfValue}" var="item">
<p>{!item}</p>
</aura:iteration>
</aura:component>
***DecryptServiceController.js***
init: function(cmp)
{
var list = [''];
cmp.set('v.listOfValue', list);
var action = cmp.get("c.decryptDataLightningVersion");
action.setParams({
id : cmp.get("v.recordId")
});
var myList = new Array();
var error;
action.setCallback(this, function(response)
{
var state = response.getState();
if (cmp.isValid() && state === "SUCCESS")
{
for(var i=0 ; i<response.getReturnValue().length;i++)
{
if( i==0 && response.getReturnValue()[0][0].startsWith("Error"))
{
myList.push(response.getReturnValue()[0][0]);
break;
}
else
{
var temp=response.getReturnValue()[i][0];
temp+=' : ';
temp+=response.getReturnValue()[i][1];
myList.push(temp);
}
}
}
else if (cmp.isValid() && state === "ERROR")
{
error = 'Error , please contact your administrator';
myList.push(error);
}
cmp.set('v.listOfValue', myList);
});
$A.enqueueAction(action);
}
I sucessed to create my managed package and install it in the other Salesforce Account (with also this component).
But the problem is :
When I am in the other Salesforce Account and I am adding a new Action with the option Lightning Component , it is writting me **Error: No Lightning Component Quick Actions are available for your organization.**
I tried to do it with an unmanaged package in the other Salesforce Account and it is working , so I think that the problem is related to the managed package
Can you help me with this problem
thanks you very much
The code of the component is here:
***DecryptService.cmp***
<aura:component controller="raphspace.EncryptionService" implements="force:lightningQuickAction,force:hasRecordId" >
<aura:attribute name="listOfValue" type="List" />
<aura:handler name="init" value="{!this}" action="{!c.init}"/>
<aura:iteration items="{!v.listOfValue}" var="item">
<p>{!item}</p>
</aura:iteration>
</aura:component>
***DecryptServiceController.js***
init: function(cmp)
{
var list = [''];
cmp.set('v.listOfValue', list);
var action = cmp.get("c.decryptDataLightningVersion");
action.setParams({
id : cmp.get("v.recordId")
});
var myList = new Array();
var error;
action.setCallback(this, function(response)
{
var state = response.getState();
if (cmp.isValid() && state === "SUCCESS")
{
for(var i=0 ; i<response.getReturnValue().length;i++)
{
if( i==0 && response.getReturnValue()[0][0].startsWith("Error"))
{
myList.push(response.getReturnValue()[0][0]);
break;
}
else
{
var temp=response.getReturnValue()[i][0];
temp+=' : ';
temp+=response.getReturnValue()[i][1];
myList.push(temp);
}
}
}
else if (cmp.isValid() && state === "ERROR")
{
error = 'Error , please contact your administrator';
myList.push(error);
}
cmp.set('v.listOfValue', myList);
});
$A.enqueueAction(action);
}
Did you by chance update / change the API version between packaging and developing? This error can also occur if there's something not quite right with your component - it saves nice, works in dev org but not in the package. Packaged components seem to be treated more strictly. For example I don't think handlers have an access attribute (<aura:handler name="init" value="{!this}" action="{!c.init}" access="globaI'd/>) so id remove this first and then remove the next part until it works in the package.
Hope this helps.
Please mark this as solved if it's resolved.
Thanks,
Nagendra