I have written a snippet to call the managed package apex class. But I’m facing the above exception. Please help me.
debugger;
try{
var scModels = skuid.model.getModel(‘PartyMainBorrower’);
var scRow = scModels.datad0];
var accId = scRow.clcommon__Account__c;
var result = sforce.apex.execute(‘genesis.CustomButtonAction’,‘calculateExposure’,
{
Id : accId
});
alert(‘Exposure values updated!’);
}
catch(err){
alert(err);
}
Above is the script to call the managed package class. And genesis is the prefix of the managed package class. What else i have missed can anyone please help me.
Hey @SandyPanda , it’s possible that the Apex Class you’re trying to call is not accessible outside of the managed package. Apex Classes in managed packages are typically protected and cannot be freely called outside of that package.
I found this helpful Salesforce developer forum discussion: the class and methods need to be set as Global in the managed package. If these are not Global, then you will not be able to access them outside of the managed package.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.