My Stuff
Comments
-
Yes you can use OR (||) statements, but I suggest you just check for type == 'xedit' and not 'edit'. This is because nlapiGetNewRecord behaves differently when called from direct list editing. This only applies to User event scripts and not client side scripts, so If the code you pasted for field change is a client side…
-
Hello, You may need to use nlapiDateToString before setting the field value. If the custom field is of type 'Date' eg: nlapiSubmitField('inventoryitem',itemToEdit,'custitem123',nlapiDateToString(today)); If the custom field is of type 'Date/Time', append the time portion to the end of the value, eg:…
-
I believe there is a DB row limit of 5 million, but that would purge all the logs. There is also a limit of 100,000 logs per 60 minute period, but if I recall, that would change the log level of the script and notify the script owner. Thanks.
-
To word it another way. When you create a User Event script function, you can include the predefined 'type' parameter in the function definition as so: function myfunction(type) { .... } The value of 'type' will automatically hold the context in which the script is triggered. You can then check against 'type' using an If…
-
Hello LAM, For client side scripts as you describe, yes, you can use a javascript alert() for simple debugging purposes. A commonly used FireFox Add-on called FireBug can also be used which has the ability to set break points. To debug your NetSuite client side script in Firebug. -Open the Firebug add-on -Load the record…
-
1. Allow child record editing must be check on the custom record setup 2. Enable inline editing must be checked on the custom record setup 3. The custom field you want must have show in list checked. In order to reference the custom sublist, you must prefix the custom field that is set with record is parent with 'recmach'…
-
User generated logs are kept for 30 days, system error logs are kept for 60 days. The default script view will only show logs from today however, yes, you should be able to customize the view to show past logs. If you are not seeing logs from only a few days ago after customizing the view, you may want to double check the…
-
Hello, Set the firefieldchanged parameter in the api call to false. firefieldchanged {boolean} [optional] - If true, then the fieldchange script for that field is executed. If no value is provided, this argument defaults to true. (Available in Client SuiteScript only). See Using the Fire Field Changed Parameter for more…
-
Hi mhill, There is no SuiteScript API for this. Web Services can do this using the getCustomizationId operation. Thanks.
-
Hello, You can refer to the SuiteScript Record Browser in the NetSuite help. There you will see the sublist id for web site categories is 'sitecategory' It seems like you might get the record, request the sublist, edit the sublist, save the sublist to the record, save the record... but I'm not sure what the name of each…
-
Hello, Please contact NetSuite Support regarding this. Thank you.
-
This has been filed as: Defect 240991 - Portlet Script > setSubmitButton > Portlet does not submit form when pressing the enter key/carriage return key. Thank you,
-
Hello, It looks like it is opening the SuiteLet in the new window. You will likely want to return reqPOId then use that with nlapiResolveURL with type 'RECORD' to open the PO in the new window. eg: var poURL = nlapiResolveURL('RECORD', 'purchaseorder', reqPOId); Thank you,
-
Hello, There is a similar discussion here: https://usergroup.netsuite.com/users/showthread.php?t=31384 link However, please note that referencing the DOM is not officially supported or recommended by NetSuite. Thank you.
-
Hello, nlapiRequestURL may be what you are looking for. Thank you.
-
Hello SPOS, A few things need to be corrected. 1. You are receiving the error because you do not have a function defined in your script. 2. When using nlapiSetFieldValue, you need to use the internal id of the department. If you would like to use the name of the department name you would use nlapiSetFieldText. 3. If you…
-
Hello jimmyf Yes you are correct. Further to your point, a Content-Type header must be specified of either application/json or text/plain. This is discussed in SuiteAnswers article 'Supported Input and Output Content Types for RESTlets' (Answer Id: 24423) Thank you.
-
You will need to trigger your script on the Post Sourcing Function as opposed to the Field Change Function in order for itemtype not to return null. Thank you.
-
Hello, You are getting the internal id of the usernote record because, if you have this deployed to the note record, your line of code: var purchaseOrder = nlapiGetNewRecord(); Will pull the internalid of the usernote. If you want the internalid of the purchase order, rename your variable for clarity: var noteRecord=…
-
Hello, The following Defect has been created for this. Defect 226824 CSS > Mozilla Firefox version 14.0.1 > Record APIs on client side script throws error: "nsSelectValue(c, "@fields") is null" Thank you.
-
Hello, You will need to submit the record after making changes to it using nlapiSubmitRecord. eg. var id = nlapiSubmitRecord(custo); Thank you,
-
Hello, The following information is from the NetSuite Help at SuiteFlex (Customization, Scripting, and Web Services) : SuiteScript : Scripting Records, Fields, Forms, and Sublists : Direct List Editing and SuiteScript : Direct List Editing and SuiteScript Overview. *In the UI and in SuiteScript, you can only direct list…
-
Hello Srujana, You can append the parameters to your URL in your User Event Script. var urlStr = nlapiResolveURL("SUITELET",'customscript55', 'customdeploy1') + '&mySOid=' + nlapiGetRecordId(); Then in your Suitelet, assign the parameter to the variable. var SOid = request.getParameter('mySOid'); Thank you
-
Per the NetSuite Help: Given that there are no time limits imposed on script execution, NetSuite has put internal mechanisms in place to detect “runaway scripts” that include infinite loops. Once caught, these scripts will be terminated and an SSS_INSTRUCTION_COUNT_EXCEEDED error message is thrown. Should you receive this…
-
Hello Dave, Try setting the target URL to https://debugger.netsuite.com/app/site/hosting/restlet.nl?script=###&deploy=# And, if you have an Authorization header, remove it completely. I believe the JSESSIONID in the Cookie header you set is used to identify the account information. If you specify an Authorization header,…
-
Hello Sameerss, Give your script record and your deployment record a unique 'ID'. For example your script record could have the ID 'customscript_sameerss_suiteletabc', and your script deployment could have the id 'customdeploy_sameerss_deployementabc'. Use something unique that would not pre-exist in the target account.…
-
Is 'Printed Picking Ticket' a custom field? If so, the system notes would have an entry 'Printed Picking Ticket' = 'F' for when the Sales Order was first created. So your code may be validating this code first: if (ticket[i].getText('field','systemnotes')== 'Printed Picking Ticket' &&…
-
Hello, I believe if you were to use a For..In loop in javascript, you would set it up similar to this: var myArray= ["Value1", "Value2", "Value3","Value4"]; for(var i in myArray) { alert(myArray[i]); } Thank you,
-
Hello, Currently, scripting is not supported on the Address Form. Please feel free to vote for Enhancement 181765: SSS > Support scripting on address form. Thank you.
-
Hello Amelia, For all your nlapiSetCurrentLineItemValue calls, try setting the synchronous parameter to 'true'. synchronous {boolean} [optional] - If not set, defaults to false and the API executes asynchronously. If set to true, this API executes synchronously, which ensures a predictable script execution. Setting to true…