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
hector.asp2hector.asp2 

Invalid Type:MergeRequest

Hello All,

 

I want to use the api merge() method in this class. I created a apex class and I got the following error for this statement:

MergeRequest mr = new MergeRequest();

 

Error: Compile Error: Invalid type: MergeRequest at line 7 column 33

 

If any one could point what am I doing wrong and what should be my approach, I want to call this webservice through flex.

 

My reference document is

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_merge.htm

 

 

global class clsWbSrv_MyService {

    webService static String fnMyService (String StdObjType, String MasterId, String Slave1Id, String Slave2Id) {
        String Result ='';
    Account masterAccount = new Account();

    MergeRequest mr = new MergeRequest();

      .................
      .................
      .................


       Result +=StdObjType + ' ' + MasterId + ' ' + Slave1Id + ' ' + Slave2Id;
        return Result;  
    }

}

 

 

Thanks

Hector....

 

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

You appear to be reading the web services API docs, but trying to program in apex (which is different), check the apex language reference docs for how to do merges in apex.

All Answers

SuperfellSuperfell

You appear to be reading the web services API docs, but trying to program in apex (which is different), check the apex language reference docs for how to do merges in apex.

This was selected as the best answer
hector.asp2hector.asp2

Hi Simon,

 

Thanks for you reply. I have started looking out for merge call using apex itself.

 

I was trying to expose apex methods as web services, ref link :

http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_deploying_additional.htm|StartTopic=Content%2Fapex_deploying_additional.htm|SkinName=webhelp

 

Thanks

Hector....