Luis
08/20/2025, 12:26 PMRaj
08/20/2025, 9:17 PMSCM_NON_UI_SCRIPT_CONTEXT: This record can only be created or edited through a user interface.
Has anyone faced this? Any workaround?Lucas
08/21/2025, 5:49 PMPatrick
08/22/2025, 1:43 PMjen
08/25/2025, 4:21 PM<https://XXXXX.app.netsuite.com/app/common/custom/itemoptions.nl?whence=>
or ideally the actual CSV download link from that page <https://XXXXXX.app.netsuite.com/app/common/custom/itemoptions.csv?bundlefilter=BLANK&sortcol=rank&sortdir=ASC&csv=Export&OfficeXML=F&pdf=&size=1000&showall=T>
I’ve tried calling both using https.get and proper oauth headers but it just takes me to a login page. I know it’s something to do with that URL and that otherwise my headers are ok, as I’ve tested by calling the URL of an internal-only Suitelet and THAT works just fine.Summer Sun
08/26/2025, 3:53 AMalien4u
08/26/2025, 3:07 PMVaibhav Patil
08/26/2025, 4:40 PMAaron McCausland
08/27/2025, 10:28 PMfunction getTransactions(){
try{
const curScript = runtime.getCurrentScript();
const datasetId = curScript.getParameter({name: "custscript_fbsg_distautobill_dataset"});
const myQuery = query.load({id: datasetId});
const condYesterday = myQuery.createCondition({fieldId: "createddate", operator: query.Operator.ON, values: "today"});//TODO: Change to yesterday once done testing.
myQuery.condition = myQuery.and(myQuery.condition, condYesterday);
log.debug("getTransactions condition", myQuery.condition);
return myQuery;
}catch(err){
log.debug("getTransactions error", err);
}
}
What's going on?Kristopher Wood
08/28/2025, 7:28 PMJC
08/28/2025, 8:57 PMreza.seedin
08/29/2025, 5:21 AMMia Li
08/29/2025, 9:15 AMBryan Miller
08/29/2025, 4:07 PMjen
08/29/2025, 4:29 PMKristopher Wood
08/29/2025, 5:29 PMashokkumar9640444
09/01/2025, 9:17 PMJR
09/03/2025, 3:07 PM/**
* @NApiVersion 2.x
* @NScriptType ClientScript
*/
define(['N/record', 'N/ui/dialog', 'N/log', 'N/error'], function(record, dialog, log, error) {
function validateLine(scriptContext) {
var currentRecord = scriptContext.currentRecord;
var sublistId = scriptContext.sublistId;
var myItem = currentRecord.getCurrentSublistValue({
sublistId: sublistId,
fieldId: 'item'
});
if (myItem === '42343') {
// If validation passes and a new line should be added
try {
// Select a new line in the same sublist
currentRecord.selectNewLine({
sublistId: sublistId,
});
// Set values for the new line
currentRecord.setCurrentSublistValue({
sublistId: sublistId,
fieldId: 'item',
value: 52154
});
// ... set other field values as needed
currentRecord.setCurrentSublistValue({
sublistId: sublistId,
fieldId: 'location',
value: 14
});
currentRecord.setCurrentSublistValue({
sublistId: sublistId,
fieldId: 'quantity',
value: 2
});
// Commit the new line
currentRecord.commitLine({
sublistId: sublistId,
});
} catch (e) {
// Handle any errors during line creation
log.error({
title: 'Error adding new line',
details: e.message
});
}
}
// Always return true to allow the original line to be committed
return true;
}
return {
validateLine: validateLine
};
});
Patrick
09/03/2025, 4:55 PMVamshi Reddy
09/03/2025, 5:44 PMPatrick
09/05/2025, 12:21 PMSim Greenbaum
09/08/2025, 8:26 PMAND transaction.status in ('TrnfrOrd:B') vs transaction.status = 'B'
GMR Admin
09/08/2025, 11:36 PM// For each expense line, if cseg_comseg has a value, copy it to custcoll_gnt_comm_rqst
for (var i = 0; i < context.newRecord.getLineCount({ sublistId: 'expense' }); i++) {
var commNo = context.newRecord.getSublistText({ sublistId: 'expense', fieldId: 'cseg_comseg', line: i });
if (commNo) {
context.newRecord.setSublistText({ sublistId: 'expense', fieldId: 'custcoll_gnt_comm_rqst', text: commNo, line: i });
}
}
Error: Invalid custcoll_gnt_comm_rqst reference key COM53.
We're replacing a custom field with a custom segment, and I've got both lists. using the same values but different IDs, hence the setSublistText. The custom field is filtered, but this IS a valid value. Why is it giving me the error?Sim Greenbaum
09/09/2025, 3:10 PMJR
09/09/2025, 3:12 PMRyan Longenecker
09/09/2025, 9:36 PMYogita Kyatam
09/10/2025, 6:17 AMtuli
09/11/2025, 1:42 PMCory Weiner
09/11/2025, 3:16 PMjen
09/11/2025, 11:16 PM