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
kiran25kiran25 

How can i add a list of Records for Integration?

Hi, 
I am New Bie to salesforce development , changed my Role Admin to development recently. 
I have requirement to recieve 3 feilds data from SAP 

I am trying to create Webservice SOAP UI class to provide for Third party team as WSDL file .

I was able to achieve with this but they responded after providning WSDL file.
 

global Class Routecode {
//add webservice method in order to use Soap API 

Webservice Static String CreateNewPoint(String Name, String CountryCode, String PortName,String Route_Code)
{
Point__c Point = new Point__c();
try{
Point.Name = Point.Name;
Point.CountryCode__c =Point.CountryCode__c;
Point.PortName__c= Point.PortName__c;

Insert Point;
}
catch(Exception ex){
System.debug('Exception'+ex.getMessage());
}
return Point.Id;
}
}

Response : 

In your wsdl, only allowed single record. The web service should allow list of records. Request to make change to wsdl.

 






 

kiran25kiran25
Can anyone help me on this its bit urgent  to close 
kiran25kiran25
need help on this please i was able to send only one record but not complete bulk like 200 records 
global Class Pointcode {
    
    //add webservice method in order to use Soap API 
   
    Webservice Static String CreateNewPoint(String Name,String CountryCode ,String PortName,String Route_Code)
    {
        
        List<point_c> po = new List<point_c>
        
        try{
            
For ( point__c a : po ){
            Point.Name = po.Name;
            Point.Country_Code_c =po.Country_Code_c;
            Point.PortName_c= po.PortName_c;
}
  Po.add ( a)        
            Insert po;
        }
        
        
        
        
        
        
        catch(Exception ex){
            System.debug('Exception'+ex.getMessage());
        }
        return Point.Id;
    }
     
    
}

i am having Errors on Catch statement for this code