My Stuff
Comments
-
That should work, although it's not robust: you could have an assembly with quantity on hand plus buildable qty. And the previous scenario isn't covered.
-
'buildable' is not a scriptable field, (not) shown here in the NS record browser. It's a calculated field based on available inventory, so you could recreate it with formulas.
-
I've never scripted a binworksheet, are you essentially trying to move inventory into various bins from a null bin location? If so, how did the inventory get loaded into NS to start, through a Inventory Adjustment (IA)? If so, I would just redo the IA to include the bin. Or you could attempt an Inventory Transfer / Bin…
-
Also, which column is causing problems, and what type of field is it? If it's a list/record field (a related record), you may need permissions there too.
-
Since you need to report on it, my suggestion is to run a Scheduled Script as follows. [LIST] [*]Create your custom field of 'Buildable' for each assembly item [*]Script runs a search for all assembly items. Result Columns are 1) Internal ID, 2) Buildable, 3) Member Item, 4) Member Qty. Make sure your search iterates for…
-
Loop through with the results with a for loop in javascript. Examples are here The additional logic is needed because of this BOM scenario, shown indented Assembly Item A ..Inventory Item X ..Inventory Item Y ..Assembly Item B ....Inventory Item X ....Inventory Item Z If Assembly Item B has 0 quantity available, but is…
-
If Ayman's suggestion doesn't work, add some debugging lines using nlapiGetContext() and it's multiple methods, eg getPermission(name), getRole(), getName(), etc. This should shed some light on what's happening with you permission.
-
In re-reading your question, I believe you want to subtract a day from today, not add one... I would change the code to function saveSOCheck() { // Validate due date var despatchDueDateValue = nlapiGetFieldValue('custbody_despatch_due_date'); var despatchDueDate = nlapiStringToDate(nlapiGetFieldValue('custbody_des…
-
What's happening is that a js date object is more than the date, it also includes time. Using nlapiStringToDate, a mm/dd/yyyy value is converted to a js date, with a time of 0:00 (12 midnight) Using new Date(), you will capture the current time of the current date, which will always be greater than nlapiStringToDate. The…
-
Sounds like this is a User Event script, so you can use nlapiGetOldRecord() to load the old record, then find the parent from that object. https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteCloudCustomizationScriptingWebServices/SuiteScript/RecordAPIs.html#bridgehead_N3030453
-
It's running after submit, so you can't change the record... unless you reload the record, and then resubmit it. As it's written, it shouldn't work for create or edit.
-
This would be best done with Custom Forms. Simply pick the fields on the form(s) and set them to Mandatory.
-
There are at least 2 ways to get more than 1000 records. I use this one all the time.
-
you have a typo, maybe that's the problem? return fales;
-
Maybe consider doing it thru scripted searches and csv. You could pull all of your data through searches (low governance), crunch the data in a script, and save the updates to a csv file in a specific folder in your file cabinet. Then a separate scheduled script takes over which looks for files in that folder, launches a…
-
Do you use nlapiCommitLineItem(type) after all changes? Also there are some client script functions that address 'firefieldchange' maybe that would work... I know this is a user event but you might consider testing as a client script. Can you post the whole script or the portion of the function that is in question.
-
Sublists updating are tricky. I've run into problems with changing customers, and the sublists act erratically. To debug this, I would temporarily change this script to loop twice -- first loop sets the item and units, plus set the price level to 'custom' and the rate to 0. Second loop sets the price back to the original…
-
Hi Ken - I would suggest you rebuild this as a scheduled script (which has 10x the governance of suitelet). The scheduled script can be run and have the resulting pdf files emailed to a user for printing, or saved to a file cabinet folder... or even better it could email directly to customers if that works in your business…
-
Hi Dan - if you need to show an alert, then you must use a Client Script. Alternatively you could use a send an email alert with a User Event script, but you will not be able to interact with the user interface. You can determine if it's a new record by using nlapiGetRecordId. From the NS help: nlapiGetRecordId() Use this…
-
function sb_onPageInit(type) { var vend = nlapiGetFieldValue('vendor.inactive') if(type == 'copy' && vent = 'true'){ alert("The PO you are copying has an inactive vendor"); } should be function sb_onPageInit(type) { if(type == 'copy'){ var entity = nlapiGetFieldValue('entity'); var isinactive = nlapiLookupField('vendor',…
-
A saved search will still show values if 'store value' = F
-
That's correct, 'fulfillment' record doesn't have 'shipdate', instead use 'date'. The 'salesorder' record uses either the first or last 'fulfillment' 'date' as the 'shipdate'.
-
Are you using a custom field for the 'modified internal id'? If so, you could do this without a script. Make your custom field a SQL formula, uncheck the 'store value' box.
-
try removing your filters, add them to your columns. Then add debug in the results loop to see what the status and ship date are nlapiLogExecution('DEBUG', 'description', value)
-
Ah you are using 'Pick Pack and Ship' option... I think you are on the right track then with system notes, but you will need to debug that. I've never tried scripting a system notes search, but I'd start out with doing the same debug as before by moving the expression from your filter to your column. Also in your last…
-
Hi jkelly, try use a lookup to determine if it's serialized. This will be faster and save unnecessary steps of loading entire records, and maybe fix your issue of loading the wrong record type. Old Code: if( itemType == "NonInvtPart") item_rec_type = "noninventoryitem"; if( itemType == "Assembly") item_rec_type =…
-
That seems excessive, especially for the beforeload user event... that runs server side so it should be much faster. Some other options: a beforesubmit user event, an aftersubmit user event, or make a template quote (with the two standard items on it) and create new quotes from that by copy.
-
A really simple user event script would do it function before_load(type, form){ var current_context = nlapiGetContext(); if (type == 'create' && current_context.getExecutionContext() == 'userinterface'){ nlapiSetFieldValue('generateintegratedshipperlabel', 'T'); } } Load this into your script folder, create a user event…
-
Try replacing 'QQQ' with something else for testing, like 'testQQQ' I suspect that you already have an itemid with this value.
-
What about mandatory fields? Try nlapiSubmitRecord(item_obj, true, true); to ignore mandatory