My Stuff
Comments
-
I mean I just tried using it with this code and it worked fine in debugger. /** * @NApiVersion 2.x * @NScriptType UserEventScript * @NModuleScope SameAccount */ require(['N/record', 'S/moment'], /** * @param {record} record * @param {moment} moment */ function(record, moment) { afterSubmit(); function…
-
I'm not sure if I'm missing something, but I created a folder in the file cabinet just named 'S' and I load in moment.js by typing /** * @NApiVersion 2.x * @NScriptType UserEventScript * @NModuleScope SameAccount */ define(['N/record', 'S/moment'], /** * @param {record} record * @param {moment} moment */ function(record,…
-
The only time I've disabled a field in a sublist is when I was creating the field myself, here is the code... maybe you guys can use it. sublist.addField({ id: 'title_', type: 'text', label: 'Title' }).updateDisplayType({ displayType: 'DISABLED' });
-
What Michoel said, you can save one extra line with this. eventRecord.getField({ fieldId: 'custevent12' }).isDisabled = true;
-
Ahh, okay missed that. Thanks Erictgrubaugh!
-
Thanks David... I tried that first and couldn't get it to work ... only to now realize the sales order ID I was trying to pass in was inside an if statement and the getValue wasn't getting triggered..... sad day
-
Something I did when I first started in SS2.0 / Javascript /** * @NApiVersion 2.x * @NScriptType ScheduledScript * @NModuleScope SameAccount */ define(['N/file', 'N/record', 'N/search'], /** * @param {file} file * @param {record} record * @param {search} search */ function(file, record, search) { // InvoiceCorrections();…
-
Ah I see it in the context, thanks!
-
I didn't have much time to look at this, but there are a couple syntax errors in your script. Extra commas and these two lines aren't in 2.0. I'm not sure if you can get/set values without it being structured in 2.0 syntax, binWS.setText('location', 'AMZ') var lineCount = binWS.getLineCount('item')
-
So after quite a while of testing, and working with netsuite support, we finally figured out that if you change this script to afterSubmit. Get the ID and load the record in script, then comment out the piece about setting 'shippingaddresslist' to null. The script works properly. Just know that the documentation for…
-
Aannnd solved my own problem, so I created a new script record of the Workflow Action Script and it ran fine. Looks like there might be a hidden limit to 10 uses of script record in a workflow
-
I've tried both ways, with no luck.
-
You can set it to whatever variable you want when you pass it in to the function /** * @NApiVersion 2.x * @NScriptType ClientScript * @NModuleScope Public */ define(['N/currentRecord', './mylibraryscript.js'], /** * @param {currentRecord} currentRecord */ function(currentRecord, mylib) { // set the variable here function…
-
To give you a broader view of what is going on, I've created a new event form, that sales reps click on a customer record, that pulls fields from the customer record and sets them to the new event. Which is all done in a beforeLoad... except the multiselect field, which I had to do in a pageInit. These fields on the new…
-
I've been working in a beforeLoad userevent to try and set the values, and I could never get it working. When I tried setting the values in a pageInit client script it worked right away using a getValue, setValue. I think it's because in a beforeload the record isn't loaded in dynamic mode, and you need to have real time…
-
The getCurrentSublistValue solution worked. Thanks starling!
-
I found it, just changed the type for the sublist from list to ''inlineeditor'
-
Alright so I found some information about adding tabs and sublist to that tab in a user event script, I didn't need a suitelet at all... I hope. So this code works fine on create and creates the tab and sublist, now I'm trying to figure out how to attach my actual Custom Sublist that i've already created to it. It doesn't…
-
I've never done that before, I didn't know you could load a suitelet as a sublist. I'm going to go search suiteanswers for a walkthrough. Thanks David! I was rebuilding the entire form in a suitelet. This will save some time.
-
So it's creating the search based off of the customer, which a sales rep click new event from that already created customer. So it should have all of the information that's needed... which is the internal id of the customer. The search is just getting all the open tasks / events on the customer
-
I haven't used module path but I've got a Client script on a button using clientScriptFileId /** * @NApiVersion 2.x * @NScriptType UserEventScript * @NModuleScope Public */ define(['N/search'], function(search) { function beforeLoad(scriptContext) { var estimateRecord = scriptContext.newRecord; var entity =…
-
Have you tried working with it in postSourcing instead of fieldChanged?
-
If you're just trying to check if there is a result you could just run the search at a get range and check the length. var salesOrderSearch = search.create({ type: "salesorder", filters: [ ["type","anyof","SalesOrd"], "AND", ["name","anyof", customer], "AND", ["mainline","is","T"] ], columns: [ "entity" ] }); var result =…
-
When creating a sublist on the form in a beforeLoad I was able to disable the field this way. sublist.addField({ id: 'title_', type: 'text', label: 'Title' }).updateDisplayType({ displayType: 'DISABLED' });
-
I've done this on a client script pageInit/fieldChanged with this code. objRecord.getField({ fieldId: 'custitem_discontinued' }).isDisabled = true; I'm sorry, I read this wrong, you're working with a sublist. I haven't tried that yet.
-
Possibly the filter you need, it worked for me loading a search. mySearch.filters.push(search.createFilter({ name: 'datecreated', operator: 'within', values: ["10/1/2016 12:00 am", "10/10/2016 11:59 pm"] })); (is 'createddate' a field you created?)
-
Alright, I'll look into that, Thanks!
-
They also added a currentRecord module! https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4625600928.html
-
I noticed that you're not loading the 'N/currentRecord' module in the define statement, but passing a variable for currentRecord.
-
Have you tried insertLine? I vaguely remember having the same issue but I can't remember from which script. This might help... for (var i = 0; i < negativeBin.length; i++) { negativeAdjustment.insertLine({ sublistId: 'inventory', line: i }); negativeAdjustment.setSublistValue({ sublistId: 'inventory', fieldId: 'item',…