Benjamin Hille
11/18/2019, 12:53 PM{
"type": "<https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1>",
"title": "Error while accessing resource: Please enter value(s) for: Tax Code",
"status": 400,
"o:errorCode": "USER_ERROR"
}
even though I am trying to set the tax code I can see on the record. {
"itemid": "SalesItem {{$timestamp}}",
"subtype": "SALE",
"incomeaccount": 54,
"expenseaccount": 116,
"salestaxcode": "6",
"purchasetaxcode": 6
}
I wonder if it is because we have a UK instance which uses VAT?John-Paul Jorissen
11/18/2019, 8:32 PMinternalId
of a MatrixOption
list to each child. Is it possible to add matrix options via SuiteTalk? I am not seeing it in the service definition nor or the help page.battk
11/18/2019, 9:02 PMbattk
11/18/2019, 9:03 PMJohn-Paul Jorissen
11/18/2019, 9:19 PMhumzariaz
11/20/2019, 7:34 AMCan anyone sharecode using TBA ..I'm getting [SOAP Fault Web Exception]: The request failed with HTTP status 403: Forbidden. when trying to integrate netsuite using suitetalk c#.suitetalk c#
michoel
11/20/2019, 7:58 AMmichoel
11/20/2019, 7:58 AMhumzariaz
11/21/2019, 8:28 AMhumzariaz
11/21/2019, 8:30 AMhumzariaz
11/21/2019, 8:34 AMhumzariaz
11/21/2019, 8:34 AMusing <http://NetSuite.com|NetSuite.com>.netsuite.webservices;
using System;
using <http://System.Net|System.Net>;
using System.Security.Cryptography;
using System.Xml;
namespace NetSuite {
class SuiteTalkCourse {
public NetSuiteService _service;
public SuiteTalkCourse()
{
_service = new NetSuiteService()
{
CookieContainer = new CookieContainer(),
tokenPassport = GetUpdatedTokenPassport(),
preferences = new Preferences()
{
runServerSuiteScriptAndTriggerWorkflows = false,
runServerSuiteScriptAndTriggerWorkflowsSpecified = true,
}
};
}
[STAThread]
static void Main(string[] args)
{
<http://System.Net|System.Net>.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
SuiteTalkCourse ns = new SuiteTalkCourse();
try
{
ns.getVendor();
Console.WriteLine("");
}
catch (System.Web.Services.Protocols.SoapException ex) {
string fault = ex.Detail.FirstChild.Name;
string code = null;
string message = null;
System.Collections.IEnumerator ienum = ex.Detail.FirstChild.ChildNodes.GetEnumerator();
while (ienum.MoveNext()) {
XmlNode node = (XmlNode)ienum.Current;
if (node.Name == "code") {
code = node.InnerText;
} else if (node.Name == "message") {
message = node.InnerText;
}
}
Console.WriteLine("\n*** SOAP FAULT: fault type={0} with code={1}. {2}", fault, code, message);
}
catch (<http://System.Net|System.Net>.WebException ex) {
Console.WriteLine("[SOAP Fault Web Exception]: {0}", ex.Message);
}
catch (System.InvalidOperationException ex) {
Console.WriteLine("[SOAP Fault Invalid Operation Exception]: {0}", ex.Message);
}
catch (System.Exception ex) {
Console.WriteLine("[Error]: {0}", ex.Message);
}
Console.ReadLine();
}
static TokenPassport GetUpdatedTokenPassport()
{
return CreateTokenPassport(
account: "********",
consumerKey: "********************************************************",
consumerSecret: "********************************************************",
tokenId: "********************************************************",
tokenSecret: "********************************************************"
);
}
static public TokenPassport CreateTokenPassport(string account, string consumerKey, string consumerSecret, string tokenId, string tokenSecret)
{
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
byte[] data = new byte[20];
rng.GetBytes(data);
int value = Math.Abs(BitConverter.ToInt32(data, 0));
string nonce = value.ToString();
long timestamp = ((long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds);
string baseString = account + "&" + consumerKey + "&" + tokenId + "&" + nonce + "&" + timestamp;
string key = consumerSecret + "&" + tokenSecret;
string signature = "";
var encoding = new System.Text.ASCIIEncoding();
byte[] keyBytes = encoding.GetBytes(key);
byte[] baseStringBytes = encoding.GetBytes(baseString);
using (var hmacSha1 = new HMACSHA1(keyBytes))
{
byte[] hashBaseString = hmacSha1.ComputeHash(baseStringBytes);
signature = Convert.ToBase64String(hashBaseString);
}
return new TokenPassport()
{
account = account,
consumerKey = consumerKey,
token = tokenId,
nonce = nonce,
timestamp = timestamp,
signature = new TokenPassportSignature
{
algorithm = "HMAC-SHA1",
Value = signature
}
};
}
private void getVendor() {
RecordRef vendorRef = new RecordRef {
internalId = "10",
type = RecordType.customer,
typeSpecified = true
};
_service.get(vendorRef);
}
}
}
Rani
11/21/2019, 10:40 PMbattk
11/21/2019, 10:43 PMbattk
11/21/2019, 10:44 PMRani
11/21/2019, 10:54 PMhumzariaz
11/22/2019, 8:06 AMMark Bennett
11/27/2019, 4:11 PMClosed
, or set isClosed
to true on all the order items. But when I send the update message to Netsuite, I get back an error that You do not have permissions to set a value for element paymenteventdate
. I've already got some permissions set on the API user's role, including full permission on Transactions > Sales Order, but have no idea which permission might be missing to allow me to set the paymenteventdate.
Given the old problem of permission changes taking at least an hour to take effect and the number of different permissions, I can't really just go through trying them all one by one. Any suggestions which permission I need to grant, or how to go about finding which permission I need?Mark Bennett
11/27/2019, 4:14 PMMark Bennett
11/27/2019, 4:15 PMNickSuite
11/28/2019, 9:50 AMHasnain Shah
11/28/2019, 1:07 PMhumzariaz
11/28/2019, 1:17 PMUri url = new Uri("<https://rest.netsuite.com/app/site/hosting/restlet.nl?script=992&deploy=1>");
OAuthBase req = new OAuthBase();
String timestamp = req.GenerateTimeStamp();
String nonce = req.GenerateNonce();
String ckey = "504ee7703e1871f22180441563ad9f01f3f18d67ecda580b0fae764ed7c4fd38"; //Consumer Key
String csecret = "b36d202caf62f889fbd8c306e633a5a1105c3767ba8fc15f2c8246c5f11e500c"; //Consumer Secret
String tkey = "080eefeb395df81902e18305540a97b5b3524b251772adf769f06e6f0d9dfde5"; //Token ID
String tsecret = "451f28d17127a3dd427898c6b75546d30b5bd8c8d7e73e23028c497221196ae2"; //Token Secret
String norm = "";
String norm1 = "";
String signature = req.GenerateSignature(url, ckey, csecret, tkey, tsecret, "GET", timestamp, nonce, out norm, out norm1);
//Percent Encode (Hex Escape) plus character
if(signature.Contains("+")) {
signature = signature.Replace("+", "%2B");
}
String header = "Authorization: OAuth ";
header += "oauth_signature="" + signature + "",";
header += "oauth_version="1.0″,";
header += "oauth_nonce="" + nonce + "",";
header += "oauth_signature_method="HMAC-SHA1″,";
header += "oauth_consumer_key="" + ckey + "",";
header += "oauth_token="" + tkey + "",";
header += "oauth_timestamp="" + timestamp + "",";
header += "realm="ACCT123456″";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("<https://rest.netsuite.com/app/site/hosting/restlet.nl?script=992&deploy=1>");
request.ContentType = "application/json";
request.Method = "GET";
request.Headers.Add(header);
WebResponse response = request.GetResponse();
HttpWebResponse httpResponse = (HttpWebResponse)response;
humzariaz
11/28/2019, 1:24 PMHasnain Shah
11/29/2019, 7:59 AMhumzariaz
11/29/2019, 10:06 AMKris Wood
12/03/2019, 12:53 AMM Cook
12/03/2019, 2:54 PMM Cook
12/03/2019, 2:57 PMdsteinert
12/03/2019, 7:23 PM