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","[email protected]");
define("NS_PASSWORD","xyz-2");
define("NS_ROLE","1030");
define("NS_ACCOUNT","12345_SB1");
define("NS_APPID","XUYZ-0218-4F5E-9078-5524E8EEF339");
2

There are 2 best solutions below

2
On

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.

0
On
  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.