My Stuff
Comments
-
I've created files before as a csv, It could be that you need to set the folder after creating the object var fileObj = file.create({ name: fname, fileType: file.Type.CSV, contents: resultSet.join('n') }); fileObj.folder = 4724267; fileObj.save()
-
The Record needs to be in dynamic mode, var rec = record.create({ type: 'customrecord_sub', isDynamic: true });
-
In 2.0 I see that it says an operator and filter is required var options = objField.getSelectOptions({ filter : 'C', operator : 'startswith' }); I can't get it to work either, getting the same error.
-
Definitely will be helping out with this, thanks for letting us know!
-
It has worked for me in the past var values = search.lookupFields({ type: record.Type.CUSTOMER, id: entity, // this being your internal id columns: ['firstname', 'lastname', 'companyname'] }); var firstName = values.firstname;
-
Try this, mySearch.filters.push(search.createFilter({ name: 'internalid', operator: 'anyof', values: 'target_id' }));
-
No problem!
-
Here, you just need to add a record to load /** * @NApiVersion 2.x * @NScriptType UserEventScript * @NModuleScope SameAccount */ require(['N/record'], /** * @param {record} record */ function(record) { afterSubmit(); function afterSubmit(scriptContext) { var objRecord = record.load({ type: record.Type.SALES_ORDER, id:…
-
Thank you so much, I've got everything working now! Here's my finalized code: I do have another question though. Is there any documentation on editting urls? Where can I find 'Entity_INTERNALID' ? if(duplicateCheckbox){ var dupeIds = record.getValue({ fieldId: 'custevent75' }).split(','); var stringDupeIds; for(i = 0; i…
-
var sublist = 'Sublist: ' + context.fieldId' log.debug('Field Changed: ', sublist);
-
I tried using 'redirect.toSavedSearchResult' and didn't have any luck getting it to work.
-
Yeah I made a mistake, I didn't add the parameters in the script in the ui... Thanks for the help.
-
Yeah I figured, I was hoping there was an easier way. Thanks dansteg.
-
Only thing I found that had anything to do with date is in the util module and here is the code example. Which by the way, if anyone didn't know the 'N/log' and 'N/util' are always loaded in your scripts, you don't need to add them in your require/define. var todaysDate = new Date(); util.isDate(todaysDate); // returns…
-
Thank you michoel, that work perfectly.
-
Nevermind, I ended up getting a list of the internal IDs for the dropdown and using record.submitFields
-
Also I just saw that the 'N/task' module includes a task.MapReduceScriptTaskStatus set of functions where you can hopefully get some more information.
-
Sweet that totally worked. Thanks egrubaugh !
-
Here's the documented info for Map/Reduce script's governance, just in case it helps. I'm going to start my own testing on Map/Reduce scripts pretty soon and try to keep looking at the forums if I can give you anymore info. Stage API Usage Limit Input [LIST] [*]10,000 units [/LIST] Map [LIST] [*]1,000 units per function…
-
The save button does, trigger the confirmation dialog box. But for some reason when you click OK, nothing happens. Here's my code for reference. define(['N/ui/dialog', 'N/log'], /** * @param {dialog} dialog * @param {log} log */ function(dialog, log) { // saveRecord(); function saveRecord(result){ var options = { title:…
-
Do you have any idea why when you press the OK dialog button it does nothing? It says on the documentation that "Boolean true if the record is valid. Boolean false to suppress form submission." and I've tried returning true and false, nothing happens with either. I can get the OK button to send alerts, So I know I'm in the…
-
Just in-case someone looks at this thread... This is the correct way to make the search.createColumn with sort and formula. search.createColumn({ name: 'formulanumeric', type: 'float', formula: '({quantity}-{quantityshiprecv})*{effectiverate}', //THIS IS WRONG sortdir: 'ASC' }), search.createColumn({ name:…
-
It randomly re-appeared about an hour ago.... I wasn't trying on any 1.0 folder, because I don't have any open... So I have no idea what's going on.
-
Yes that's what it looks like, you can have up to 1000 units in each of your map functions, and grouped together all of the functions cannot exceed 10000 units for each map/reduce. but it looks like if you use just reduce, you can have up to 5000 units in a function, up to 10000 units all together. On the subject of an…
-
var searchResults = sSearch.run().getRange(0, 500); I do it this way so I can set how many results I want.
-
I got mine to work, thanks for the help. I think the deployment was wrong. I'm now moving on to the question of how to get the script to "click" the save button on pressing 'OK'
-
Mines pretty much the same thing, the issue I'm having is that "dialog.confirm(options).then(success).catch(failure)" it errors on '.catch' I'm also using this on the "saveRecord" part of the ClientScript.
-
ahhhh the return on the dialog.confirm fixed it, Thank you so much egrubaugh. This has been driving me crazy
-
Yeah we did try that ironside, the problem is that the dialog box doesn't wait for an answer. It just continues save. I think the Promise just continues to run and gets to the return. So you click save, it asks, the script continues to run to the end of dialog.confirm.then.catch without waiting for the .then and then…
-
So, just an update. I've set this up the same as the code above, the dialog button works and pops up with ok or cancel. The problem now is that the actual save button doesn't wait for the answer from the Confirmation popup. It just saves it anyway. For some reason the dialog.confirm(options).then(success).catch(failure);…