function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PeterUPeterU 

Can't access method of Managed Package in Eclipse

I'm sure I'm just missing something obvious, but I can't get Eclipse to recognize a method in a Managed Package. The package is the Dupe Eliminator from the AppExchange. I get the error:

 

 

Save error: Method does not exist or incorrect signature: dupe_eliminator__MergeRecord.mergeSObject(LIST:SOBJECT:Account, Boolean)   

 

 

I assumed the procedure would be: 

1) Install the package from AppExchange. 

2) Add the classes to Eclipse by going to the properties and refreshing the available Apex Classes.

 

I have looked in the Project properties and tried to add the Dupe Eliminator classes, but they never show up.

 

Can someone point me in the right direction? Thanks. 

 

Peter

JonPJonP

Apex classes installed via a managed package are protected IP and cannot be downloaded into the IDE from a subscriber organization.

 

However, the compile error you're getting is being returned by the server when you attempt to save your Apex class, which strongly suggests you are not calling the class/method correctly, or that you do not have access to call it.

 

If you try to make the change from the Apex editor in the web UI, is the behavior any different? 

PeterUPeterU

Thank you for the fast response. Good idea to try it from the Web UI, too. Unfortunately the error was the same. In fact, I pasted in the sample code from the Dupe Eliminator User's Guide and still got the same error. The sample code:

 

List<Account> accs = new List<Account>();
    accs.add(new Account(Name='master acc'));
    accs.add(new Account(Name='acc1'));
    accs.add(new Account(Name='acc2'));
    insert(accs);
try {
    dupe_eliminator__MergeRecord.mergeSObject(accs, true);
} catch (Exception e) {
    // Process exception here
}

 

The error is on the "dupe_eliminator" line. Here's the Web UI error for completeness sake:

 

Error:
Compile Error: Method does not exist or incorrect signature:
dupe_eliminator__MergeRecord.mergeSObject(LIST:SOBJECT:Account,
Boolean) at line 49 column 1

 

Here is the definition, accessed through the Web UI.

NameMergeRecord  

Namespace Prefix      
dupe_eliminator  

Installed PackageDupe Eliminator  

Api Version15.0  

StatusActive  

Is ValidChecked  

Body
global class MergeRecord {

  global static void mergeSObject(LIST:SObject, Boolean){};

  global static void mergeSObject(LIST:SObject, Boolean, LIST:String){};

  global static void mergeSObject(LIST:SObject){};

}

 

Really confused on this one. Seems like everything is right. Thanks again for the help. 

 

Peter

A_SmithA_Smith
Try calling it like this:  dupe_eliminator.MergeRecord.mergeSObject(accs, true);
PeterUPeterU

Whoo hoo! That did the trick. Thank you so much. I think that is the one syntax I didn't try. Life is good again!

 

Peter