Shiri Zohar
03/12/2024, 4:43 PMSamantha Solomon
03/12/2024, 8:33 PMshree sashti
03/13/2024, 2:30 AMreptar
03/13/2024, 1:39 PMpageInit
, but it's a terrible solution. The page fully loads and then jerks the user into reloading the page. Has anyone come up with a better solution for forcing users onto a new form without setting it as preferred? I've added an alert letting the user know they can bookmark the page they get redirected to, but I don't like this UX. at all.David B
03/13/2024, 8:41 PMCharan
03/14/2024, 8:29 AMLivio
03/14/2024, 12:52 PMChris Mattison
03/14/2024, 1:48 PMChristiaan
03/14/2024, 2:07 PMRegorr Segarra
03/14/2024, 3:18 PMTim Chapman
03/14/2024, 6:01 PMSim Greenbaum
03/14/2024, 6:07 PMcatch (e) {
if (typeof log !== "undefined") {
log.error({
title: `rate checkup Failed `,
details: e.message || JSON.stringify(e) || "No Meaningful message",
});
} else {
console.log(
`Rate checkup failed: ${
e.message || JSON.stringify(e) || "No meaningful message"
}`
);
}
}
}
Chris
03/14/2024, 6:23 PMABS(TO_DATE({created},'MM/dd/yyyy HH:mi:ss')- TO_DATE({now},'MM/dd/yyyy HH:mi:ss')) * 60 * 24
. This week it's returning an error? Anyone else run into this?Nicolas Bean
03/14/2024, 8:10 PMStefan Reeder
03/14/2024, 11:20 PMAmol Loya
03/15/2024, 4:26 PMNicolas Bean
03/15/2024, 5:30 PMJustin Xayarinh
03/15/2024, 8:33 PMSydney Brockbank
03/15/2024, 8:43 PMCraig
03/16/2024, 12:56 PMCraig
03/17/2024, 11:48 PMEmanuel V
03/18/2024, 12:10 AMZoran R-DATAGRAM
03/18/2024, 1:47 PMconst newBillID = newBill.save();
const sublistID = 'recmachcustrecord_levi9_rent_sublist_id';
newRecord.selectNewLine({sublistId: sublistID}); // Select a new line on the custom sublist
newRecord.setCurrentSublistValue({sublistId: sublistID, fieldId: 'custrecord_levi9_rent_sublist_bill', value: newBillID});
newRecord.commitLine({sublistId: sublistID}); // Commit the new line
return newBillID;
That's why I am trying to return newBill internal ID from workflow action. The client would like to be redirected (Go to Record action) to the new created Bill.
I store the result from workflow action script into workflow field (screenshot)
The next step is Go To Record and ID should be value from workflow field (screenshot) (edited)
But, NetSuite open form with Create New BILL … Any idea how to realize
• workflow action creates a transaction
• id is returned from workflow action script
• NetSuite go to record (existing new bill)Matt Carter
03/18/2024, 3:24 PMMilo
03/18/2024, 6:17 PMreptar
03/18/2024, 8:43 PMreptar
03/18/2024, 8:43 PMMissing required field: billofmaterials
. Any thoughts on what the issue might be?Todd Juenemann
03/18/2024, 8:44 PMeminero
03/18/2024, 10:12 PMYou have entered an Invalid Field Value
, I have tried to create my own script as well, no luck. On the UI, an example value is just: 3:49 pm
so I'm not sure what is the issue here
var executionTime = format.format({
value: now,
type: format.Type.TIMEOFDAY
});
Xtina
03/19/2024, 12:02 AMvar currentRecord = context.newRecord;
var stCreatedFrom = currentRecord.getValue({
fieldId: "createdfrom"
});
var objRecord = record.load({
type: record.Type.WORK_ORDER,
id: stCreatedFrom
});
var customForm = objRecord.getValue({
fieldId: "customform"
});
var qcHold = objRecord.getValue({
fieldId: "custbody_qc_hold"
});
var endDate = objRecord.getValue({
fieldId: "enddate"
});
var stItem = objRecord.getValue({
fieldId: "assemblyitem"
});
var recTransferOrder = record.create({
type: record.Type.INVENTORY_TRANSFER,
isDynamic: true
});
recTransferOrder.setValue({
fieldId: 'trandate',
value: endDate
});
recTransferOrder.setValue({
fieldId: 'location',
value: LOCATION.LOC_B
});
recTransferOrder.setValue({
fieldId: 'transferlocation',
value: LOCATION.SUB_B
});
recTransferOrder.setValue({
fieldId: 'custbody_related_wo',
value: stCreatedFrom
});
recTransferOrder.selectNewLine({
sublistId: 'inventory'
});
recTransferOrder.setCurrentSublistValue({
sublistId: 'inventory',
fieldId: 'item',
value: stItem
});
recTransferOrder.setCurrentSublistValue({
sublistId: 'inventory',
fieldId: 'adjustqtyby',
value: quantity
});
///inventory number LookUp
var stInvNum = '';
if (stItem) {
log.debug({
title: 'Lookup inventory detail Look Up',
details: 'Started'
});
var filters = [];
var columns = [];
filters[0] = search.createFilter({
name: 'internalid',
operator: <http://search.Operator.IS|search.Operator.IS>,
values: stItem
});
filters[1] = search.createFilter({
name: 'quantityonhand',
join: 'inventorynumber',
operator: search.Operator.GREATERTHAN,
values: 0
});
columns[0] = search.createColumn({
name: 'internalid',
join: 'inventorynumber'
});
var Search = search.create({
type: search.Type.ITEM,
filters: filters,
columns: columns
});
var ResultsArray = Search.run().getRange({
start: 0,
end: 10
});
if (ResultsArray.length > 0) {
stInvNum = ResultsArray[0].getValue({
name: 'internalid',
join: 'inventorynumber'
});
}
log.debug({
title: 'Inventory Detail ID',
details: stInvNum
});
}
log.debug({
title: 'DEBUG BEFORE SUB REC',
details: recTransferOrder
});
log.debug({
title: 'DEBUG recTransferOrder - inventory',
details: JSON.parse(JSON.stringify(recTransferOrder)).sublists.inventory
});
////end inventory number lookup
var inventoryDetailSubrecord = recTransferOrder.getCurrentSublistSubrecord({
sublistId: 'inventory',
fieldId: 'inventorydetail'
});
// Add a line to the subrecord's inventory assignment sublist.
inventoryDetailSubrecord.selectNewLine({
sublistId: 'inventoryassignment'
});
inventoryDetailSubrecord.setCurrentSublistValue({
sublistId: 'inventoryassignment',
fieldId: 'issueinventorynumber',
value: stInvNum
});
inventoryDetailSubrecord.setCurrentSublistValue({
sublistId: 'inventoryassignment',
fieldId: 'quantity',
value: quantity
});
// Save the line in the subrecord's sublist.
inventoryDetailSubrecord.commitLine({
sublistId: 'inventoryassignment'
});
log.debug({
title: "Subrecord",
details: JSON.stringify(inventoryDetailSubrecord)
});
recTransferOrder.commitLine({
sublistId: 'inventory'
});
var invTransId = recTransferOrder.save({
enableSourcing: true,
ignoreMandatoryFields: true
});