I am getting the following wherever I am using nlapiLoadRecord or nlapiCreateRecord in the suitescript(1.0):
"error": {
"code": "UNEXPECTED_ERROR",
"message": "syntax error (NLRecordScripting.scriptInit$lib#151)"
}
Following is the code snippet
if(datain.internalid != null){
record = nlapiLoadRecord('supportcase',datain.internalid);
}else{
record = nlapiCreateRecord('supportcase');
}
Can anyone help with this?
There is a User Event running on beforeLoad that has an error in it; based on the error, I would look for a file containing a reference like NLRecordScripting.scriptInit on line 151.
Related
Is anyone successfully using the CJ web services? while passing the parameters as text or xml am getting error.This is my code
Here is my code am using
This is the Params am using
and am getting the error like this...below I've mentioned
{
"statusCode": 400,
"body": "{"data":null,"errors":[{"message":"Syntax error while parsing GraphQL query. Invalid input """2", expected Value or Argument (line 1, column 71):\n{ publisherCommissions(forPublishers: [""5638564""], sincePostingDate:""2022-12-01T00:00:00Z"",beforePostingDate:""2022-12-28T00:00:00Z""){count payloadComplete records {actionTrackerName websiteName advertiserName postingDate pubCommissionAmountUsd items { quantity perItemSaleAmountPubCurrency totalCommissionPubCurrency }} }}\n ^"}]}",
}
please can someone solve this problem?
data is showing null I want to show the transaction details.
I am facing this issue for the Azure API Gateway implemented in few of our products :
Message Expression evaluation failed. Object reference not set to an instance of an object.
Exception type GatewayError
Failed method set-variable[2]
{ "statusCode": 500, "message": "Internal server error", "activityId": "bbcf1e2d-c3bd-4020-8a40-cffd99a7f09e" }
This is random. As per my analysis, when I get ResponseCode as 500 or 0 from Back end API, my policy expression evaluation fails where I am capturing RequestMethod, ResponseBody, StatusCode Received, RequestBody, RequestURL and storing the same in a variable.
I read a few troubleshooting articles and have confirmed that the BASE tag is not missing from anywhere under policies. Apparently, this could cause some issues.
Trying to fix the issue, I have now used a conditional operator while setting each variable however the same error still occurs.
<choose>
<when condition="#((string)(context.Variables["RequestOperation"]) == "POST")">
<set-variable name="RequestedBody" value="#(context.Request.Body == null ? " Unable to capture":
context.Request.Body.As<string>(preserveContent: true))" />
</when>
<otherwise>
<set-variable name="RequestedQueryParameters" value="#(context.Request.Url.QueryString == null ||
context.Request.Url.QueryString == "" ? "Unable to capture":(string)context.Request.Url.QueryString)" />
</otherwise>
</choose>
This code is written in the INBOUND policy under the BASE tag.
Policy expression evaluation is failing with the following error message:
Message Expression evaluation failed. Object reference not set to an instance of an object.
Exception type GatewayError
Failed method set-variable[2]
Can someone please help me to solve this problem.
set-variable[2] indicates there is issue in second instance of statement in your policy. I'm unsure whether instance count also . Something you can test very quickly by executing policy with and without and see if instance count changes.
I debug such issues by using try/catch and setting variable or output trace and then use APIMs Test tool to identify issues. Here is what you can try:
`<set-variable name="RequestedQueryParameters" value="#{
try {
return string.IsNullOrEmpty(context.Request.Url.QueryString? "Unable to capture" :(string)context.Request.Url.QueryString);
}
catch (Exception ex)
{
return ex.Message;
}
return string.Empty;
}" />
`
HTH.
Hi we have just started using time series insight .We need to list specified list of values of properties under particular Time series id .As per the documentation in azure we were using the following API in post method to achieve this .
https://XXXXX_EnvironmentFqdn_XXXXX.env.timeseries.azure.com/timeseries/query?api-version=2018-11-01-preview
When posting the following request body to the API
{
"getEvents":{
"timeSeriesId": ["UniqueId"],
"searchSpan": {
"from": "2019-02-17T00:00:00Z",
"to": "2019-02-18T00:16:50Z"
},
"projectedProperties": ["DesiredProp"]
}
}
it returns a 400 Bad Request with following error message.
{
"error": {
"code": "InvalidInput",
"message": "Error converting value \"DesiredProp\" to type
'Microsoft.Rdx.Client.Events.Property'. Path
'getEvents.projectedProperties[0]', line 9, position 45.\r\n---> Could
not cast or convert from System.String to
Microsoft.Rdx.Client.Events.Property.\r\n"
}
}
on removing the projectedProperties property from response body API works fine,but it will return all the properties of the time series .
any help will me much appreciated and thanks in advance .
I want to upload excel file and show the content of uploaded excel file data grid. Everything is going well. But when i convert the the content in the form of byteArray in excel sheet format with the help of loadFromByteArray() function then system is giving me error as "Cannot access a property or method of a null object reference".
Here is my code to upload excel content:
protected function browseExcelFile(event:MouseEvent):void
{
excFileRef = new FileReference();
excFileRef.addEventListener(Event.SELECT, onSelect);
excFileRef.addEventListener(Event.COMPLETE, onComplete);
var fileFilter:FileFilter = new FileFilter("Excel (.xls)", "*.xls");
excFileRef.browse([fileFilter]);
}
private function onSelect(event:Event):void {
excelFileName.text = excFileRef.name;
excFileRef.load();
}
private function onComplete(event:Event):void {
excelFileName.text = excFileRef.name;
exceldataInByte = new ByteArray();
exceldataInByte = event.currentTarget.data;
if(exceldataInByte.length > 0){
var excObj:ExcelFile = new ExcelFile();
excObj.loadFromByteArray(exceldataInByte); /* this line give error */
var sheet:Sheet = excObj.sheets[0];
}
}
I dont know why this error occuring, i have searched on many sites but everywhere everyone posted the same way as i have done to upload excel but my code gives me error.
Please tell me why this error occur?
EDIT: After viewing this preview (http://activetuts.s3.amazonaws.com/tuts/169_as3xls/1/preview.html) I realized that this excel import tool only works with spreadsheets who only have 2 columns of data, regardless of how many columns your datagrid has. After trying to load an .xls file of only two columns into my own test app, it is working as expected.
I believe I recreated your error.
Here is the line that threw the error:
excObj.loadFromByteArray(exceldataInByte); /* this line give error */
Here is the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.as3xls.xls::ExcelFile/dimensions()[/...com/as3xls/xls/ExcelFile.as:619]
at Function/http://adobe.com/AS3/2006/builtin::call()
at com.as3xls.xls::ExcelFile/loadFromByteArray()[/...com/as3xls/xls/ExcelFile.as:309]
at stackoverflow/onComplete()[C:\...\src\stackoverflow.mxml:47]
Here is the line which is throwing the error in the swc (line 619): https://code.google.com/p/as3xls/source/browse/trunk/src/com/as3xls/xls/ExcelFile.as#619
I suggest you checkout the source code into your workspace from here (https://code.google.com/p/as3xls/source/checkout), and debug to find what is broken.
In my current error handling, I specify the Form, function and error message in a messagebox similar to the following.
try
{
//Some code here
}
catch(Exception ex)
{
MessageBox.Show("Form Title : " + this.Title + "\nFunction : CurrentFunction \nError : " + ex.Message);
return;
}
This works for me, but was curious if I can make the process even more simple, and generate the function name, instead of typing it out every time I want to display the error message.
Additionally:
I know you can include the stacktrace and view the top few lines, but I was curious if there was a cleaner way to show the function.
Yes, if you just need the current function (not the calling function), you can use MethodBase.GetCurrentMethod:
string currentMethod = System.Reflection.MethodBase.GetCurrentMethod().Name;