My Stuff
Comments
-
My best guess is that you have some field on the transferorder that is dynamically capturing the "current user". When running that code in the script debugger the "current user" is you. However, in scheduled scripts the "current user" is "System" (which is identified as user -4), which is not a valid user for the field in…
-
You may be able to use the request parameter passed to the beforeLoad function described here: https://netsuite.custhelp.com/app/an.../kw/beforeLoad Use nlapiResolveURL to create a url for the 'create' page of the record you are trying to copy and add some custom parameters to the query string. The request parameter in the…
-
It looks like the copy url is created by resolving the url of the record being copied in edit mode and then adding the url parameter cp=T. var url = nlapiResolveURL('RECORD', recordType, recordToCopyId, 'edit') + '&cp=T' + '&is_custom_copy=1'; function beforeLoad(type, form, request) { if (type === 'copy' &&…
-
I am not sure how to fit the code into the workflow. Whether or not it can be part of the custom action depends on if the action runs client side or server side. My approach would be to run the following client side code once the user presses the button. var url = nlapiResolveURL(...) window.location = url; If the action…
-
In version 2017.2 they exposed the systemnote record type to suitescript. https://netsuite.custhelp.com/app/answers/detail/a_id/65709
-
The values for the createpo column are: "" --> no choice, "DropShip" --> Drop Shipment "SpecOrd" --> Special Order For many select fields in Netsuite you can right click the dropdown box in your browser and use inspect element. Near the input element is a div with a class "ns-dropdown" that details the available values for…
-
function saveRecord(context) { // ... if(isNotValid) { window.alert('some fields are not valid'); return false; } return true; }
-
I have seen this when dynamically building search filter expressions. This bug only appears in server scripts. You can run the following code in the script debugger to demonstrate the error: (I left some context in to show an actual use case for building the expression this way): [CODE] require(["N/search"],…
-
Hey sorry if I was unclear. I was trying to explain why the "official" addButton works but your current script does not. Just change your onclick like so and it should work (be sure to use the real file cabinet path). onclick="require(['/path/to/pe2_cs_quote'], function(client) { client.onclick_showPriceList(); });"…
-
Path is the location of your client script in the file cabinet. So if your client script is in the "SuiteScripts" folder the path would be "/SuiteScripts/pe2_cs_quote". If your client script is in the "cs_quote_project" folder in the "SuiteScripts" folder the path would be "/SuiteScripts/cs_quote_project/pe2_cs_quote".
-
Your onclicks expect functions in the global namespace, but in my experience SuiteScript 2.0 client scripts do not export their functions to the global namespace. When you add a button to the form using form.addButton its onclick() calls require() on a client script added to the form using form.clientScriptModulePath.…
-
Hi mburstein, today I experienced a similar issue with INVALID_FLD_VALUE , except I was trying to set a currency field. The following is all server-side. I saw: You have entered an Invalid Field Value 4 for the following field: amount when I tried to save a record after doing this: // ... var amt = 4; rec.setSublistValue({…