+ Start a Discussion
Akash Garg 2Akash Garg 2 

how to write rest class test class for apex class for code coverage over 75%

Hi
I'm new to salesforce.
Can anyone help in writing the test class.
global class tridentUpdateOverduePGLWebService
{    
    webservice static SFAResponse updateOverdue(Overdue_element[] OverdueRec) 
    {       
        //HttpRequest req = new HttpRequest();   
        //req.setHeader('Content-Type','application/x-www-form-urlencoded');
        SFAResponse objResponse = new SFAResponse();
        Exceptions__c excep = new Exceptions__c();                          // to capture web service failure exceptions.
        list<OverDue_PGL__c> OverdueLst = new list<OverDue_PGL__c>{};
        
    for (Integer i=0; i<OverdueRec.size();i++)
    {
        OverDue_PGL__c OverDueObj= new OverDue_PGL__c();
        
        OverDueObj.CustomerName_name1_new__c= OverdueRec[i].CustomerName_name1_new;
        OverDueObj.Total_Outstanding_INR_DMBTR_new__c = OverdueRec[i].Total_Outstanding_INR_DMBTR_new;
        OverDueObj.Payment_Term_Zterm_new__c = OverdueRec[i].Payment_Term_Zterm_new;
        OverDueObj.Overdue_Amount_INR_ovr_amt_new__c = OverdueRec[i].Overdue_Amount_INR_ovr_amt_new;
        OverDueObj.Ageing_Days_days_new__c = OverdueRec[i].Ageing_Days_days_new;      
        OverDueObj.Excise_Invoice_exnum_new__c = OverdueRec[i].Excise_Invoice_exnum_new;      
        OverDueObj.Item_Text_sgtxt_new__c = OverdueRec[i].Item_Text_sgtxt_new;
                              
        OverdueLst.add(OverDueObj);
        system.debug('Values taken');
  }

    if (Overduelst.size()>0)
    {                     
        try
            {
                insert OverdueLst;                
                objResponse.Status = true;
                objResponse.Description = 'Record Updated';
                system.debug('Record Updated');     
            }    
       catch(exception e)
            {
                system.debug('Error');
                excep.Record_Id__c = OverdueLst[0].CustomerName_name1_new__c;
                excep.error__c = e.getmessage();
                insert excep;
                
              //objResponse.SFDCId = OverdueLst.CustName;
                objResponse.Status = false;
                objResponse.Description = e.getmessage();
            }
     }
     else
     {        
      objResponse.Status = false;
      objResponse.Description ='No Item found to update';
      system.debug('Record not Updated');
     }
   return objResponse;                                                  // this will return result.
   }
        global class Overdue_element
      {
        webservice string CustomerName_name1_new;
        webservice string Total_Outstanding_INR_DMBTR_new;
        webservice string Payment_Term_Zterm_new;
        webservice string Overdue_Amount_INR_ovr_amt_new;
        webservice string Ageing_Days_days_new;
        webservice string Excise_Invoice_exnum_new;
        webservice string Item_Text_sgtxt_new;
    }
     global class SFAResponse
    {
      //webservice Id SFDCId;       
        webservice Boolean Status; 
        webservice String Description;
    }
}

need urgently.
Please guide and help
Best Answer chosen by Akash Garg 2
Nagendra Prasad ChNagendra Prasad Ch
Here is the complete class which covers both try, catch blocks.
 
@isTest
private class tridentUpdateOverduePGLWebService_Test {
    private static testmethod void testCase(){
        OverDue_PGL__c pgl = new OverDue_PGL__c() ; 
        pgl.Name='Test' ; 
        pgl.CustomerName_name1_new__c = 'Test' ;
        pgl.Total_Outstanding_INR_DMBTR_new__c = 'Test' ; 
pgl.Payment_Term_Zterm_new__c = 'Test';
            pgl.Overdue_Amount_INR_ovr_amt_new__c = '120';
            pgl.Ageing_Days_days_new__c = '12';      
            pgl..Excise_Invoice_exnum_new__c = 'Test';      
            pgl..Item_Text_sgtxt_new__c = 'Test';
        insert pgl ; 
        tridentUpdateOverduePGLWebService.Overdue_element ele = new tridentUpdateOverduePGLWebService.Overdue_element() ;
        ele.Ageing_Days_days_new ='12';
        ele.CustomerName_name1_new='Test' ;
        ele.Excise_Invoice_exnum_new='test' ; 
        ele.Item_Text_sgtxt_new='test';
        ele.Overdue_Amount_INR_ovr_amt_new='120';
        ele.Payment_Term_Zterm_new='test';
        ele.Total_Outstanding_INR_DMBTR_new='test' ; 
        tridentUpdateOverduePGLWebService.SFAResponse resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;
    }
	
	// This method will generate exception so catch block will be covered
	private static testmethod void testCaseException(){
        OverDue_PGL__c pgl = new OverDue_PGL__c() ; 
        pgl.Name='Test' ; 
        pgl.CustomerName_name1_new__c = 'Test' ;
        pgl.Total_Outstanding_INR_DMBTR_new__c = 'Test' ; 
pgl.Payment_Term_Zterm_new__c = 'Test';
            pgl.Overdue_Amount_INR_ovr_amt_new__c = '120';
            pgl.Ageing_Days_days_new__c = '12';      
            pgl..Excise_Invoice_exnum_new__c = 'Test';      
            pgl..Item_Text_sgtxt_new__c = 'Test';
        insert pgl ; 
        tridentUpdateOverduePGLWebService.Overdue_element ele = new tridentUpdateOverduePGLWebService.Overdue_element() ;
        ele.Ageing_Days_days_new ='String For Exception'; // Insert string instead of number to get exception
        ele.CustomerName_name1_new='Test' ; 
        ele.Excise_Invoice_exnum_new='test' ; 
        ele.Item_Text_sgtxt_new='test';
        ele.Overdue_Amount_INR_ovr_amt_new='String For Exception';
        ele.Payment_Term_Zterm_new='test';
        ele.Total_Outstanding_INR_DMBTR_new='test' ; // Insert string instead of number to get exception
        tridentUpdateOverduePGLWebService.SFAResponse resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;
    }
    
}

Please let me know if it helps.

All Answers

Alberto OMAlberto OM
Hello Akash, initialize the Overdue_element object with data for the test, then invoke this static method with your initialized object as parameter, assigning the result on a SFAResponse object:
SFAResponse sfar = tridentUpdateOverduePGLWebService.updateOverdue(oe);
Assert on the result of the call and repeat if necessary to raise and capture the exception.
Raj VakatiRaj Vakati
Hello Akash ,

Here is  the code 

 
@isTest
private class tridentUpdateOverduePGLWebService_Test {
    private static testmethod void testCase(){
        OverDue_PGL__c pgl = new OverDue_PGL__c() ; 
        pgl.Name='Test' ; 
        pgl.CustomerName_name1_new__c = 'Test' ;
        pgl.Total_Outstanding_INR_DMBTR_new__c = 'Test' ; 
pgl.Payment_Term_Zterm_new__c = 'Test';
            pgl.Overdue_Amount_INR_ovr_amt_new__c = '120';
            pgl.Ageing_Days_days_new__c = '12';      
            pgl..Excise_Invoice_exnum_new__c = 'Test';      
            pgl..Item_Text_sgtxt_new__c = 'Test';
        insert pgl ; 
        tridentUpdateOverduePGLWebService.Overdue_element ele = new tridentUpdateOverduePGLWebService.Overdue_element() ;
        ele.Ageing_Days_days_new ='12';
        ele.CustomerName_name1_new='Test' ;
        ele.Excise_Invoice_exnum_new='test' ; 
        ele.Item_Text_sgtxt_new='test';
        ele.Overdue_Amount_INR_ovr_amt_new='120';
        ele.Payment_Term_Zterm_new='test';
        ele.Total_Outstanding_INR_DMBTR_new='test' ; 
        tridentUpdateOverduePGLWebService.SFAResponse resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;
        
        
        
        
    }
    
}


 
Akash Garg 2Akash Garg 2
Hi
rajamohan vakati 17
I have tried your mentioned code.
Its works but gives only 72 % code coverage.
please help to increase the code coverage.
Alberto OMAlberto OM
I guess the missing coverage belongs to the exception. Try to raise it in a second call by changing the data, eg: exceeding any of the String lengths in the Object.
Akash Garg 2Akash Garg 2
Hi
Alberto OM
Can you please write code as i'm new to coding and i have no idea what are you saying to do.
Alberto OMAlberto OM
In addition Rajamohan's code:
ele.Total_Outstanding_INR_DMBTR_new='TEST1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';
resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;

 
Raj VakatiRaj Vakati
Hi Akash,
Add the code as per Alberto OM . it will cover catch block.

Thanks ,
Raj 


 
Akash Garg 2Akash Garg 2
Hi 
Alberto
I have added the new code lines but nothing happens.
Still it is giving 72% code coverage.
Please help as i have stuck badly in this.
Nagendra Prasad ChNagendra Prasad Ch
Here is the complete class which covers both try, catch blocks.
 
@isTest
private class tridentUpdateOverduePGLWebService_Test {
    private static testmethod void testCase(){
        OverDue_PGL__c pgl = new OverDue_PGL__c() ; 
        pgl.Name='Test' ; 
        pgl.CustomerName_name1_new__c = 'Test' ;
        pgl.Total_Outstanding_INR_DMBTR_new__c = 'Test' ; 
pgl.Payment_Term_Zterm_new__c = 'Test';
            pgl.Overdue_Amount_INR_ovr_amt_new__c = '120';
            pgl.Ageing_Days_days_new__c = '12';      
            pgl..Excise_Invoice_exnum_new__c = 'Test';      
            pgl..Item_Text_sgtxt_new__c = 'Test';
        insert pgl ; 
        tridentUpdateOverduePGLWebService.Overdue_element ele = new tridentUpdateOverduePGLWebService.Overdue_element() ;
        ele.Ageing_Days_days_new ='12';
        ele.CustomerName_name1_new='Test' ;
        ele.Excise_Invoice_exnum_new='test' ; 
        ele.Item_Text_sgtxt_new='test';
        ele.Overdue_Amount_INR_ovr_amt_new='120';
        ele.Payment_Term_Zterm_new='test';
        ele.Total_Outstanding_INR_DMBTR_new='test' ; 
        tridentUpdateOverduePGLWebService.SFAResponse resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;
    }
	
	// This method will generate exception so catch block will be covered
	private static testmethod void testCaseException(){
        OverDue_PGL__c pgl = new OverDue_PGL__c() ; 
        pgl.Name='Test' ; 
        pgl.CustomerName_name1_new__c = 'Test' ;
        pgl.Total_Outstanding_INR_DMBTR_new__c = 'Test' ; 
pgl.Payment_Term_Zterm_new__c = 'Test';
            pgl.Overdue_Amount_INR_ovr_amt_new__c = '120';
            pgl.Ageing_Days_days_new__c = '12';      
            pgl..Excise_Invoice_exnum_new__c = 'Test';      
            pgl..Item_Text_sgtxt_new__c = 'Test';
        insert pgl ; 
        tridentUpdateOverduePGLWebService.Overdue_element ele = new tridentUpdateOverduePGLWebService.Overdue_element() ;
        ele.Ageing_Days_days_new ='String For Exception'; // Insert string instead of number to get exception
        ele.CustomerName_name1_new='Test' ; 
        ele.Excise_Invoice_exnum_new='test' ; 
        ele.Item_Text_sgtxt_new='test';
        ele.Overdue_Amount_INR_ovr_amt_new='String For Exception';
        ele.Payment_Term_Zterm_new='test';
        ele.Total_Outstanding_INR_DMBTR_new='test' ; // Insert string instead of number to get exception
        tridentUpdateOverduePGLWebService.SFAResponse resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;
    }
    
}

Please let me know if it helps.
This was selected as the best answer
Akash Garg 2Akash Garg 2
The updated test class is:-
@isTest
private class tridentUpdateOverduePGLWebService_Test {
    private static testmethod void testCase(){
        OverDue_PGL__c pgl = new OverDue_PGL__c() ; 
            pgl.Name='Test' ; 
            pgl.CustomerName_name1_new__c = 'Test' ;
            pgl.Total_Outstanding_INR_DMBTR_new__c = 'Test' ; 
            pgl.Payment_Term_Zterm_new__c = 'Test';
            pgl.Overdue_Amount_INR_ovr_amt_new__c = '120';
            pgl.Ageing_Days_days_new__c = '12';      
            pgl.Excise_Invoice_exnum_new__c = 'Test';      
            pgl.Item_Text_sgtxt_new__c = 'Test';
            insert pgl ; 
        
        tridentUpdateOverduePGLWebService.Overdue_element ele = new tridentUpdateOverduePGLWebService.Overdue_element() ;
        ele.Ageing_Days_days_new ='12';
        ele.CustomerName_name1_new='Test' ;
        ele.Excise_Invoice_exnum_new='test' ; 
        ele.Item_Text_sgtxt_new='test';
        ele.Overdue_Amount_INR_ovr_amt_new='120';
        ele.Payment_Term_Zterm_new='test';
        ele.Total_Outstanding_INR_DMBTR_new='test' ; 
        tridentUpdateOverduePGLWebService.SFAResponse resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;
        
        ele.Total_Outstanding_INR_DMBTR_new='TEST890';
        resp = tridentUpdateOverduePGLWebService.updateOverdue(new List<tridentUpdateOverduePGLWebService.Overdue_element>{ele}) ;
          
    }
    
}

this is still giving 72 % code coverage.
Akash Garg 2Akash Garg 2
Hi
Ch Nagendra Prasad
Code works and it is now giving me 93% code coverage.
Thanks u very much.
Akash Garg 2Akash Garg 2
Hi 
can anyone also help in writing test class of following apex class:-
global class tridentUpdateCFormsWebService
{    
    webservice static SFAResponse updateCForms(CForms_element[] cfrmRec) {   
        SFAResponse objResponse = new SFAResponse();
        Exceptions__c excep = new Exceptions__c();                              // to capture web service failure exceptions.      
        List<C_Forms__c> cformList = new List<C_Forms__c>();
        List<string> sapCustList = new List<string>();
        for(CForms_element cfrmCust : cfrmRec)
        {
            if(cfrmCust.SAP_CustomerId != null && cfrmCust.SAP_CustomerId != '')
            sapCustList.add(cfrmCust.SAP_CustomerId);
        }
        Map<string,string> mapCust = new Map<string,string>();
        for(account cust : [select id, Cust_SAP_No__c from Account where Cust_SAP_No__c in : sapCustList])
        {mapCust.put(cust.Cust_SAP_No__c,cust.Id);}
        if(cfrmRec[0].SAP_Message == null || cfrmRec[0].SAP_Message == '')
        {
            for(CForms_element cfrm_Rec : cfrmRec)
            {
                C_Forms__c cform_Rec = new C_Forms__c();
                                
                cform_Rec.Excise_Invoice_No_vbeln_new__c = cfrm_Rec.Excise_Invoice_No_vbeln_new;
                cform_Rec.Customer_SAP_Code__c = cfrm_Rec.SAP_CustomerId;
                
                if(mapCust.get(cfrm_Rec.SAP_CustomerId) != null)
                cform_Rec.Account__c = mapCust.get(cfrm_Rec.SAP_CustomerId);
                cform_Rec.Customer_Name_name1_new__c = cfrm_Rec.Customer_Name_name1_new;              
                cform_Rec.Region_regio_new__c = cfrm_Rec.Region_regio_new;                
                cform_Rec.VAT_Amount_zvat_amt_new__c = cfrm_Rec.VAT_Amount_zvat_amt_new;
                cform_Rec.Diff_Liability_zdiff_amt_new__c = cfrm_Rec.Diff_Liability_zdiff_amt_new;
                cform_Rec.Accounting_Document_Number_belnr_new__c = cfrm_Rec.Accounting_Document_Number_belnr_new;              
                cform_Rec.Company_Code_bukrs_new__c = cfrm_Rec.Company_Code_bukrs_new;     
                cform_Rec.Fiscal_Year_gjahr_new__c = cfrm_Rec.Fiscal_Year_gjahr_new;
                cform_Rec.Quarter_zquarter_new__c = cfrm_Rec.Quarter_zquarter_new;
                cform_Rec.Invoice_Value_zinv_value_new__c = cfrm_Rec.Invoice_Value_zinv_value_new;
                cform_Rec.Tax_on_sales_and_Purchases_cod_mwskz_new__c = cfrm_Rec.Tax_on_sales_and_Purchases_cod_mwskz_new;
                                    
                cformList.add(cform_Rec);
            }
            try{
                upsert cformList;
                                                
                objResponse.SFDC_Rec_No = cfrmRec[0].Excise_Invoice_No_vbeln_new;
                objResponse.Status = true;
                return objResponse;
            }
            catch(exception e){
                excep.Record_Id__c = cfrmRec[0].Excise_Invoice_No_vbeln_new;
                //excep.Order__c = cfrmRec[0].cformsId;
                excep.error__c = e.getmessage();
                insert excep;
                
                objResponse.SFDC_Rec_No = cfrmRec[0].Excise_Invoice_No_vbeln_new;
                objResponse.Status = false;
                objResponse.Description = e.getmessage();
                return objResponse;// this will return result.
            }
        }
        else
        {
            list<Exceptions__c> lstexcep = new list<Exceptions__c>();
            for(integer i=0; i < cfrmRec.size(); i++)
            {
                Exceptions__c exp = new Exceptions__c();
                exp.Name = 'E';             
                
                lstexcep.add(exp);
            }
            insert lstexcep;
                       
            objResponse.SFDC_Rec_No = cfrmRec[0].Excise_Invoice_No_vbeln_new;
            objResponse.Status = false;
            return objResponse;// this will return result.
        }                            
    }
    global class CForms_element
    {
        webservice string SAP_CustomerId;        
        webservice string Customer_Name_name1_new;
        webservice string Excise_Invoice_No_vbeln_new;
        webservice string Region_regio_new;
        webservice string VAT_Amount_zvat_amt_new;
        webservice string Diff_Liability_zdiff_amt_new;
        webservice string Accounting_Document_Number_belnr_new;
        webservice string Company_Code_bukrs_new;
        webservice string Fiscal_Year_gjahr_new;
        webservice string Quarter_zquarter_new;
        webservice string Invoice_Value_zinv_value_new;
        webservice string Tax_on_sales_and_Purchases_cod_mwskz_new;
        webservice string SAP_Message;
    } 
    global class SFAResponse
    {
        webservice String SFDC_Rec_No;       
        webservice Boolean Status; 
        webservice String Description;
    }
 }

 
Alberto OMAlberto OM
Hey dude... One thing is helping you out, and a very different one doing your code, don't you think?
Akash Garg 2Akash Garg 2
Hey Alberto,
is there any issue with the code above
Alberto OMAlberto OM

I'm very sorry to say this and I don't want to sound unpolite, but the issue is with your attitude. You should have learned from the previous test method, and apply the knowledge to the second one, instead of pretending to have your work done by the community...

Just my opinion though...

Akash Garg 2Akash Garg 2
Hey Alberto,
I have tried test class but it only gives me 72% code coverage.
Can anyone help in increasing the code coverage.
@isTest
private class tridentUpdateCFormsWebService_Test 
{
    private static testmethod void testCase()
    {
        
        C_Forms__c pgl = new C_Forms__c() ; 
            //pgl.Name='CF-1234' ; 
            pgl.Excise_Invoice_No_vbeln_new__c = '125' ;
            pgl.Customer_Name_name1_new__c = 'test' ; 
            pgl.Region_regio_new__c = '1';
            pgl.VAT_Amount_zvat_amt_new__c  = '9';
            pgl.Diff_Liability_zdiff_amt_new__c  = '1';      
            pgl.Accounting_Document_Number_belnr_new__c  = '12';      
            pgl.Company_Code_bukrs_new__c = '123';
            pgl.Fiscal_Year_gjahr_new__c  = '1';
            pgl.Quarter_zquarter_new__c  = '2';
            pgl.Invoice_Value_zinv_value_new__c  = '12';
            pgl.Tax_on_sales_and_Purchases_cod_mwskz_new__c  = '2';
        insert pgl ; 
        
        tridentUpdateCFormsWebService.CForms_element ele = new tridentUpdateCFormsWebService.CForms_element() ;
            ele.Excise_Invoice_No_vbeln_new = '125' ;
            ele.Customer_Name_name1_new = 'test' ; 
            ele.Region_regio_new = 'test';
            ele.VAT_Amount_zvat_amt_new = '1';
            ele.Diff_Liability_zdiff_amt_new = '1';      
            ele.Accounting_Document_Number_belnr_new = '122';      
            ele.Company_Code_bukrs_new = '123';
            ele.Fiscal_Year_gjahr_new = '1';
            ele.Quarter_zquarter_new = '1';
            ele.Invoice_Value_zinv_value_new = '12';
            ele.Tax_on_sales_and_Purchases_cod_mwskz_new = '2';
            ele.SAP_CustomerId = '7564';
        tridentUpdateCFormsWebService.SFAResponse resp = tridentUpdateCFormsWebService.updateCForms(new List<tridentUpdateCFormsWebService.CForms_element>{ele}) ;
    }
    
                            // This method will generate exception so catch block will be covered
    private static testmethod void testCaseException()
    {  
        C_Forms__c pgl = new C_Forms__c() ; 
            //pgl.Name='CF-1234' ; 
            pgl.Excise_Invoice_No_vbeln_new__c = '125' ;
            pgl.Customer_Name_name1_new__c = 'test' ; 
            pgl.Region_regio_new__c = '1';
            pgl.VAT_Amount_zvat_amt_new__c  = '9';
            pgl.Diff_Liability_zdiff_amt_new__c  = '1';      
            pgl.Accounting_Document_Number_belnr_new__c  = '12';      
            pgl.Company_Code_bukrs_new__c = '123';
            pgl.Fiscal_Year_gjahr_new__c  = '1';
            pgl.Quarter_zquarter_new__c  = '2';
            pgl.Invoice_Value_zinv_value_new__c  = '12';
            pgl.Tax_on_sales_and_Purchases_cod_mwskz_new__c  = '2';
        insert pgl ; 
        
        tridentUpdateCFormsWebService.CForms_element ele = new tridentUpdateCFormsWebService.CForms_element() ;
            ele.Excise_Invoice_No_vbeln_new = 'String For Exception' ;
            ele.Customer_Name_name1_new = 'test' ; 
            ele.Region_regio_new = 'test';
            ele.VAT_Amount_zvat_amt_new = '1';
            ele.Diff_Liability_zdiff_amt_new = '1';      
            ele.Accounting_Document_Number_belnr_new = 'String For Exception';      
            ele.Company_Code_bukrs_new = '123';
            ele.Fiscal_Year_gjahr_new = '1';
            ele.Quarter_zquarter_new = '1';
            ele.Invoice_Value_zinv_value_new = '12';
            ele.Tax_on_sales_and_Purchases_cod_mwskz_new = '2'; 
            ele.SAP_CustomerId = '7564';
        tridentUpdateCFormsWebService.SFAResponse resp = tridentUpdateCFormsWebService.updateCForms(new List<tridentUpdateCFormsWebService.CForms_element>{ele}) ;
    }
    
}