Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Print inventory detail (expiration date) on an Item Fulfillment pdf form - script
Hello,
I'm trying to run a script for some reason is not working. I'm following the instructions from SuiteAnswer: ID 49137 - but so far, I'm not getting anything on the form, but also, I'm not getting any errors.
This is the script I have:
http:///**
*@NApiVersion 2.x
*@NScriptType UserEventScript
*/
define(['N/record', 'N/search', 'N/ui/serverWidget'], function (record, search, serverWidget) {
function beforeLoad(scriptContext) {
try {
if (scriptContext.type == 'print') {
var currentRec = scriptContext.newRecord;
var recid = currentRec.id;
columns[0] = search.createColumn({
name: "item",
join: "item",
sort: search.Sort.ASC,
label: "Name"
});
columns[1] = search.createColumn({
name: "itemid",
join: "item",
label: "Internal ID"