My Stuff
Comments
-
It should be available in the AfterSubmit of the UserEvent script. Here is a snippet from where we're using this approach. /** * @NApiVersion 2.x * @NScriptType UserEventScript * @NModuleScope SameAccount */ define(['N/record'], function(record) { function afterSubmit(scriptContext) { log.debug('afterSubmit.Start'); //1.…
-
You should be able to use the beforeSubmit function available on a User Event Script.
-
My guess is that since "billaddr1" is a joined in field, it's not refreshed in the scriptContext after an insert or update. Therefore, I'd try getting the customer again (via a search in your script) and then pull the billadr1 from the search results.
-
We use a couple of options: 1. Create a custom script file that stores these "parameters". Then, just access that script when you need to get those parameters. OR 2. Create a new custom record type to store these "global" settings. For added security, I've chosen to encrypt the data via the "USE ENCRYPTED FORMAT" setting…
-
Here is a sample script that was adapted from code that is working in our prod environment. I've scrubbed it of proprietary info, but should be working (mostly) and give you the general concept. You'll need 3 pieces of script: 1. The User Event Script to be deployed for your custom record type (to add the button and make a…
-
I tried the same thing and got the same results as you. In Postman it worked; in NetSuite it returned a 406 error. I even took the headers in the request completely out of it. NetSuite: var response = https.get({url: 'https://<yourcompanyname>.atlassian.net/rest/api/2/filter/1'}); alert(JSON.stringify(response)); Returned…
-
You need to add a mainline filter, otherwise NetSuite will return the Line Items. [['mainline', search.Operator.IS, 'T'],
-
This works for me: //1. Create Invoice var objRecord = record.create({ type: record.Type.INVOICE, isDynamic: false }); objRecord.setValue({ fieldId: 'trandate', value: new Date('12/05/2018') }); //use this for date objRecord.setValue({ fieldId: 'custbody_auth_date', value: new Date('12/06/2018 10:47:59 AM') }); //use this…