2

I am trying Netsuite PHP toolkit. I am working with Sandbox account. I have provided all the requirement but on adding a new customer its giving error as .

PHP Fatal error:  Uncaught SoapFault exception: 
[soapenv:Server.userException] Could not determine customer compid.

define("NS_ENDPOINT","2017_2");
define("NS_HOST","https://webservices.sandbox.netsuite.com");
define("NS_EMAIL","example@gmail.com");
define("NS_PASSWORD","xyz-2");
define("NS_ROLE","1030");
define("NS_ACCOUNT","12345_SB1");
define("NS_APPID","XUYZ-0218-4F5E-9078-5524E8EEF339");
Deepak
  • 2,287
  • 1
  • 23
  • 30
Logita Kurrey
  • 71
  • 1
  • 10

2 Answers2

0

Try changing the NS_ACCOUNT value to your standard NS account ID. I had to do that even when I was working in the sandbox, previously.

w3bguy
  • 2,215
  • 1
  • 19
  • 34
  • 2
    I solved it. the NS_HOST should be https://NS-Accountid-SB1.suitetalk.api.netsuite.com. – Logita Kurrey Apr 07 '18 at 07:39
  • Glad you solved it. That is very weird. I've never seen, or heard of, the NetSuite account being defined as a URL. I'll keep that in mind, though, if I run into an issue like that again. – w3bguy Apr 07 '18 at 19:49
-2
  1. Your endpoint should be 2017_2_0
  2. Learn how to use the getDataCenterUrls call to get the account-specific host for NS_HOST.

Rule of thumb is the account-specific URL is something like https://NS_ACCOUNT.suitetalk.api.sandbox.netsuite.com for sandbox. Of course, replace NS_ACCOUNT with your account number. Don't bother with the _SB1 part.

Suite Resources
  • 1,164
  • 8
  • 11