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
yuriandresyuriandres 

How to integrate salesforce with Netsuite?

Can anybody help me on integrating salesforce to netsuite? Do we have a working apex class to do this?

 

a link that i can look into will help

RisrachRisrach
Hi there, You can work with the partners listed on this page to integrate the 2 solutions: http://www.netsuite.com/portal/landing/ns-sf/partners.shtml Celigo and Boomi are probably the most established options. Rob
yuriandresyuriandres

Thanks for your response Risrach..

 

However, what i would want is to create something like what Celigo and Boomi has.

 

Anyway, i was able to figure this out by creating a webservice that will be called by salesforce.

 

I might create a blog about the code and steps on how i was able to do it. But for now, i would still need to furnish it so that we can have another option other than going with the partners listed..

apexai3055apexai3055

Hi,

Could you able to complete integration between NetSuite and Salesforce.If yes, could you please guide us guide me how to do it.When we are trying to upload Netsuite WSDL, we are getting following error.

 

Error: Failed to parse wsdl: Found schema import from location platform.core.xsd. External schema import not supported

 

Thanks in advance.

gcalimlimgcalimlim

yes this is true.. this is what i also get before.. so what i did was i created a webservice hosted on a remote server that will make use of the wsdl from netsuite. next is that i will need to create a wsdl for the webservice i created so that i can parse it on salesforce. though i'm still going to the process of creating the guide for this for i'm still looking for another option. creating the class files for salesforce that netsuite wsdl is using is one of it so that we don't need to have a third party server just to make it work. i'm just having problems with the callout limitation, since netsuite wsdl can only handle one callout at a time, it will not work properly on bulk records in salesforce triggers... I hope someone was able to figure this out too.. :(

MarrisMarris

Hi

 

How can we connect Netsuite to Salesforce.com?

 

I tried putting the NS WSDL in the generate Apex classes and try to parse it but it becomes failure by throwing Error that

 

"Error: Failed to parse wsdl: Found schema import from location platform.core.xsd. External schema import not supported"

 

Anybody tried this. What is the solution for this. Need help on this?

 

Thanks

Marris

pradeeptiwari08pradeeptiwari08

Hi Yuriandres,

 

We are also trying to explore integration between Salesforce and Netsuite. Can you please help us? As you know we can use REST/SOAP API for Integration but we are focusing on REST integration. Any document or link will be great help here.

 

Regards,

Pradeep

Salesforce-IntegrationSalesforce-Integration

we too are trying to integrate Salesforce and Netsuite with jitterbit, please advice me, if any one with success atempt.

ekorzekorz

Just completed a Salesforce -> Netsuite POST using Salesforce Apex Classes & Triggers along with an active NetSuite RESTlet.  Not a complete integration at all (Informatica Cloud is pretty easy!) but it might be helpful for some.  Since I've edited the parameters, field names, etc. in my implemenation, I figured I'd at least write up the resources online to help folks start out.  This does a one-way push of data from SFDC to Netsuite, and I make that happen on a trigger (basically to add a client to our Netsuite client list):

 

Netsuite RESTlet (POST Method from their helpcenter)

 

// Create a standard NetSuite record
function createRecord(datain)
{
    var err = new Object();
   
    // Validate if mandatory record type is set in the request
    if (!datain.recordtype)
    {
        err.status = "failed";
        err.message= "missing recordtype";
        return err;
    }
   
    var record = nlapiCreateRecord(datain.recordtype);
   
    for (var fieldname in datain)
    {
     if (datain.hasOwnProperty(fieldname))
     {
         if (fieldname != 'recordtype' && fieldname != 'id')
         {
             var value = datain[fieldname];
             if (value && typeof value != 'object') // ignore other type of parameters
             {
                 record.setFieldValue(fieldname, value);
             }
         }
     }
    }
    var recordId = nlapiSubmitRecord(record);
    nlapiLogExecution('DEBUG','id='+recordId);
   
    var nlobj = nlapiLoadRecord(datain.recordtype,recordId);
    return nlobj;
}

 

Deploy that script using the POST Function "createRecord" and find the external URL of the script deployment (something like ...netsuite.com/app/site/hosting/restlet.nl?script=##&deploy=#

 

Then I used this site as the outline for the APEX:  http://docs.servicerocket.com/display/SFJIRA/Writing+Apex+Class+to+call+for+Connector+RESTful+webservice

 

just modify the JSON to be appropriate for your entry, and modify the headers, since Netsuite doesn't use a basic/blob like that I don't think.

 

 

global class NetsuiteWebserviceCallout {
    @future (callout=true)
    WebService static void createRecord ( String recordType, String entityid, String externalid, String companyname ) {
 
        //Construct HTTP request and response
        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
        String responseBody;
        
        //Construct Authorization and Content header
        String authorizationHeader = 'NLAuth nlauth_account=[YOURACCOUNT#], nlauth_email=[YOUREMAIL], nlauth_signature=[YOURPASSWORD]';
        req.setHeader('Authorization', authorizationHeader);
        req.setHeader('Content-Type','application/json');
 
        //Construct Endpoint
        String endpoint = '[YOURENDPOINT from the Script Deployment]';
 
        //Set Method and Endpoint and Body
        req.setMethod('POST');
        req.setEndpoint(endpoint);

 

//you need the minimum field pattern for whatever entity you are posting, reference their API guide
        req.setBody('{"recordtype":"'+recordType+'", "entityid":"'+entityid+'", "externalid":"'+externalid+'", "companyname":"'+companyname+'"}');
 

//to pass the apex test
        if (!Test.isRunningTest()){
 
            try {
               //Send endpoint to Netsuite
               res = http.send(req);
               responseBody = res.getBody();
               } catch(System.CalloutException e) {System.debug(res.toString());
            }
        }
       

//else if test is running
        else {
        // dummy data
        responseBody = '200';
        }
  }
        
 
}

 

 

---------

 

trigger -- you'll notice I have a few custom fields -- external ID is an autonumber field, and NetSuiteRecordType is a text field with a default value of "customer" on this object, since that's the recordType netsuite is looking for in the JSON.

 

 

trigger CreateNetsuiteCustomer on CustomObject__c (after insert) {
      
          for (CustomObject__c c : Trigger.new) {
 
                    //Define parameters to be used in calling Apex Class
                   
                    String recordType = c.NetSuiterecordType__c;
                    String entityid = c.Name;
                    String externalid = c.externalid__c;
                    String companyname = c.Name;
                 
                  //Execute the trigger
               NetsuiteWebserviceCallout.createRecord (recordType ,entityid ,externalid ,companyname);
          }        
}

 

 

sdfc learnsdfc learn
Hi, I'm still very new to Netsuite and Salesforce and I need to work on the integration. Could someone help me with some detailed documentation here? Step by step process? That will be greatly helpful. 
 
Nabamita DeNabamita De

@Risrach & @yuriandres, how did you solve the NS-SF integration challenge? If you used Celigo and Boomi, they are quite expensive, whereas there are some inexpensive options as well which might be effective as per your requirements. 
What was your budget for the whole integration project? Can you please share your experience?

Also @sdfclearn, did you get the step-by-step guide for the integration?

Swapnil C.Swapnil C.
Thanks for your query. Please visit us on https://www.nuvistastech.com/ for more help regarding NetSuite and Salesforce Integration.
NetSuite Partners in India (https://www.nuvistastech.com/)
John Mathews 5John Mathews 5
Hello All,

If anyone has issues with NetSuite Bookkeeping (https://www.theledgerlabs.com/netsuite-erp?utm_source=salesforce&utm_medium=forums&utm_campaign=netsuite), they can visit Ledger Labs. They are providing NetSuite ERP Services from NetSuite Integration to Bookkeeping.

Thanks & Regards