0
global without sharing class SFA_ConvertLead_BL{

    public static Boolean isConvertMethod = false;

    webservice static string ConvertLead(Id LeadId){

        String productSpecialistString = LABEL.SFA_PRODUCT_SPECIALIST;
        Id oppOwnerId;
        Id oppFECodeId;
        Id oicFeCode;
        String quotaTeamFECode = '';
        Lead objLead = new Lead();
        Boolean isQuotaTeamFECode = false;
        list<Id> ProductsIds = new list<Id>();
        map<string,string> mapProductIdSLP = new map<string,string>();
        map<id,id> mapPBE = new map<id,id>();
        OpportunityLineItem objOLI = new OpportunityLineItem();
        list<OpportunityLineItem> OLI_INsList = new list<OpportunityLineItem>();
        Opportunity objOppNew;
        FE_Code__c quotaTeamFECodeInst = new FE_Code__c();
        Savepoint initialSavePoint;
        Map<String,Decimal> teamMemSplitMap =new Map<String,Decimal>();
        Set<String> softWarningProfileClass = new Set<String>();
        softWarningProfileClass.add('NEW RPL HOLD');
        softWarningProfileClass.add('NOC');
        softWarningProfileClass.add('HIGH DEFAULT');
        softWarningProfileClass.add('NEW Private CIA');
        softWarningProfileClass.add('DEN');
    }

I am trying this in test class

Lead leadRecord=new Lead();
                leadRecord.LeadSource='Web';
                leadRecord.Company='TestCompany';
                leadRecord.Status='Owner-Working';
                leadRecord.Rejection_Reason__c='not accepted';
                leadRecord.LastName='Ggg';
                leadRecord.Contact_Email__c='[email protected]';
                leadRecord.Country__c='India';
                leadRecord.Account_Name__c=acc.id;
                leadRecord.Currency__c = 'USD';
                leadRecord.Email='[email protected]';

                insert leadRecord;

                **string convertLead;
                convertLead = SFA_ConvertLead_BL.ConvertLead(leadRecord);}

**


It throw an error Method does not exist or incorrect signature: SFA_ConvertLead_BL.ConvertLead(Lead)


1 Answer 1

2

ConvertLead() method is not public and that is why you can't access it directly in your test method. You can mark it with @TestVisible and you will be fine with your current error.

1
  • got it my error actualy i'm passing whole record of lead the thing is passed only record id (leadrecord.id) my problem resolved Nov 7, 2016 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .