RE: Make Authentication to Net Suite Environment

Hi,

For establishing connection to NetSuite , the following code was used

var OriginalUri = new System.Uri(nsService.Url);
if (account == null || account.Length == 0)
account = “empty”;
DataCenterUrls urls = nsService.getDataCenterUrls(account).dataCenterUrls;
Uri dataCenterUri = new Uri(urls.webservicesDomain + OriginalUri.PathAndQuery);
nsService.Url = dataCenterUri.ToString();

in this part : DataCenterUrls urls = nsService.getDataCenterUrls(account).dataCenterUrls; we transfer NetSuite Account ID in variable account and it always has returned  dataCenterUrls

Make Authentication yo Net Suite Environment

But for one of our clients this code : nsService.getDataCenterUrls(account).dataCenterUrls; returned null

I checked account ID several times and still can not get what is the cause of the problem.

Make Authentication yo Net Suite Environment

.

What should I check ? Thanks in advance !

Ivan Rookie Asked on November 15, 2022 in How To's.
Add Comment
1 Answers

Hi,

Could you inspect nsService.getDataCenterUrls(account), as opposed to nsService.getDataCenterUrls(account).dataCenterUrls.

Also, has this account definitely for web services turned on? Not sure if that would cause this but thinking out loud.

Thanks,

Chris

Intermediate Answered on November 17, 2022.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.