Feel like I am missing something here...I have a Global class in my Managed Package that I want to use to act as a simple wrapper to enable someone to have access to certain objects in my package.
As an example, the global class below is designed to make an instance of another class in the package called MyPublicClass available as a global variable called myResponse. The getMyData() method sets it to another instance of the same MyPublicClass generated by other methods in my package.
In the debug logs in an target installation org, I can see the all data for myResponse - but if I try and reference any individual variable in the myResponse class, I can get a Type not Visible error.
Do I need to make the myResponse class Global along with any variables I want to be able to access outside of the package? Just seems odd I can see the data in the debug logs but not access the actual variables?
global with sharing class MyExternalAccessWrapper {
global List<String> sFields;
global List<sObject> recordsforProcessing;
global MyPublicClass myResponse;
global Boolean getMyData() {
KWD_Wrapper kwd = new KWD_Wrapper();
kwd.sFields = sFields;
kwd.objectsforProcessing = recordsforProcessing;
try {
kwd.Execute3();
myResponse = kwd.MyPublicClass;
return TRUE;
}
Catch (Exception Ex) {
sErrorCode = Ex.getMessage();
return FALSE;
}
}
}