Discussions
Here are some examples to get your creative juices flowing.
"Did I pay vendor John Doe last month?"
"Take me to my largest sales order for this month."
"What invoices haven't been paid yet?"
How to execute suitescript 2.1 code in POSTMAN?
Hi can anyone help me execute how to run a suitescript 2.1 code in POSTMAN below is sample code.
require(['N/record'], function(record){
function createBomRevision(values, items){
var rec = record.create({
type: 'bomrevision', isDynamic: true
});
for (var key in values){
if (values.hasOwnProperty(key)){
rec.setValue({
fieldId: key,
value: values[key]
});
}
}
for (var itemIndex in items){
rec.selectNewLine({
sublistId: 'component'
});
for (var key in items[itemIndex]){
if (items[itemIndex].hasOwnProperty(key)){
rec.setCurrentSublistValue({
sublistId: 'component',
fieldId: key,
value: items[itemIndex][key]
});
}
}
rec.commitLine({sublistId: 'component'});
}
return rec.save({enableSourcing: false, ignoreMandatoryFields: false});
}
var bomRevisionId = createBomRevision({
'billofmaterials': 132,
'name': 'BOM-TEST-REV1',
'effectivestartdate': new Date('06/19/2023')