Skip to main content
Hello,

I am trying to use the match() method on the SOAP API, I am new to Soap API concepts. i am trying to use this method like this. My requirement is i have custom object with Name and Date fields. I want to get the Records based on the Lead matching rule specified. In the matching it will check Name Fuzzy match and Date field. 

public class TestCallout {

    

    public void GetDuplicates(){

        List<SObject> Orders = [select Id,Patient_Name__c,Patient_DOB__c from SRP__c];

        MatchOptions matchotpt = new MatchOptions();

        matchotpt.Fields = 'Name,DOB__c';

        matchotpt.Rule = 'Lead_Matching_Rule';

        matchotpt.SobjectType = 'Lead';

        List<Datacloud.MatchResult> callResults = new connection.match(Orders,matchotpt);

        system.debug('--results--'+callResults);

    }

    

}

I am trying to save this class i am getting these errors,

Invalid type: MatchOptions

Variable does not exist: matchotpt

Invalid type: connection.match

This is ref link : https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_match.htm

Please help me?
1 resposta
0/9000