0

I have an managed package class from that I have to call one method into another class. Managed package name :-ApiClient --> Namespace prefix:- XYZ --> Method from managed package class :- static XYZ.ApiClient.CloneResponse clone(XYZ.ApiClient.CloneRequest request) -->

I tried to call --> XYZ.ApiClient.CloneResponse.clone(); -->

what type of value should I pass into this method clone() ?

0

Having the static method ApiClient.clone in package with namespace XYZ, you are correct that this is called using:

XYZ.ApiClient.clone(value);

However, to be available for invocation with a meaningful value (and to return a meaningful response):

  1. The class "ApiClient" must be declared global
  2. The nested class "CloneResponse" must be declared global
  3. The method "clone" must be declared global
  4. The nested class "CloneRequest" must be declared global
  5. The CloneRequest class's constructor must be declared global
  6. Any properties or other methods needed on CloneRequest that must be set/invoked by the caller, and properties relevant to the caller on CloneResponse, must all be declared global

Note that it is quite possible to have done everything in points 1 through 5 but still not be able to use the clone method in a meaningful way because something from point 6 hasn't been exposed to the code outside the package.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.