pen one
08/05/2022, 3:51 PMresolveTaskLink
to create a sales order via a button and am noticing that I am not able to use custom fields in the params section. Is there maybe something I am doing wrong or a way to be able to fill in those custom fields.
/**
* @NApiVersion 2.1
* @NScriptType ClientScript
* @NModuleScope SameAccount
*/
define(['N/currentRecord','N/url'], (currentRecord, url) => {
function additionalSalesOrder(clientId, subId, showId){
var clientName = clientId;
var subName = subId;
var showName = showId;
var standName = "Test Stand";
console.log("Client Id is " + clientName);
console.log("Subsidiary Id is " + subName);
var redirectUrl = url.resolveTaskLink({
id: 'EDIT_TRAN_SALESORD',
isEditMode: true,
params: {
'entity': clientId,
'subsidiary': subId,
'custbody_standname': standName
}
});
window.open(redirectUrl);
}
function pageInit(context) {}
return {
additionalSalesOrder: additionalSalesOrder,
pageInit: pageInit
};
});
battk
08/05/2022, 3:58 PM