Created
September 21, 2023 16:49
-
-
Save thuutien/64fa83ba0d476f055c1b40b1a2a7c7ac to your computer and use it in GitHub Desktop.
Successful NetSuite Saved Search SOAP .NET core
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NetSuiteService nss = new NetSuiteService(); | |
nss.Url = "https://your-accountID.suitetalk.api.netsuite.com/services/NetSuitePort_2023_1"; | |
nss.tokenPassport = CreateTokenPassport(); // | |
TransactionSearchAdvanced tranSearch = new TransactionSearchAdvanced(); //TransactionSearchAdvanced type depends on your search object references. | |
tranSearch.savedSearchId = "searchID here"; | |
try | |
{ | |
var searchResult = nss.search(tranSearch); | |
if (searchResult.status.isSuccess) | |
{ | |
totalUnit = searchResult.searchRowList.Length; | |
foreach (var r in searchResult.searchRowList) | |
{ | |
var row = r as TransactionSearchRow; // | |
if (row != null) | |
{ | |
Console.WriteLine(row.basic.amount[0].searchValue); | |
} | |
} | |
} | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine(ex.Message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Token Passport: https://gist.github.com/thuutien/5c861ac4d95c5617657f60e9ba0bee09