We have a custom field on the lines of our sales orders that is populated by a script to pull the work order information into this custom field shown on the line of the sales order. The lines used to cut off after so many lines by default with "more...". On a recent Netsuite update it started displaying a significant amount of lines compared to before therefore elongating the sales order. How can I change this so that it isn't showing everything? This is not a field that is printed. It is only for viewing on the sales order. I've attached pictures of the custom field set up and the script. Thank you in advance!
function setSOColFieldsonWO_afterSubmit_UE(type){
//internal ID of the Work Order
var wo_internalID = nlapiGetRecordId();
//load the Work Order record
var wo = nlapiLoadRecord('workorder', wo_internalID);
//internal ID of the Sales Order that the Work Order was created from
var createdFromSO = wo.getFieldValue('createdfrom');
//if the Created From field on the Work Order has a value, do the following:
if ((createdFromSO != "") && (createdFromSO != null)){
//conduct search to obtain value of custom transaction column fields on the Sales Order that the Work Order was created from
//search filters:
//- Work Order with the current Work Order's Internal ID
//- Mainline is True
//- Applied to Transaction is Sales Order
//- Applied to Transaction (Sales Order) of the Work Order is the same as the Sales Order that the Work Order was created from
var filters = new Array();
filters[0] = new nlobjSearchFilter( 'internalid', null, 'is', wo_internalID);
filters[1] = new nlobjSearchFilter( 'mainline', null , 'is', 'T');
filters[2] = new nlobjSearchFilter( 'type', 'appliedtotransaction', 'is', 'SalesOrd' );
filters[3] = new nlobjSearchFilter( 'appliedtotransaction', null, 'is', createdFromSO );
//search columns:
// - Applied To Transaction (Sales Order) Internal ID
// - Custom Transaction Column Fields from the Applied to Transaction (Sales Order)
var columns = new Array();
columns[0] = new nlobjSearchColumn('appliedtotransaction');
columns[1] = new nlobjSearchColumn('custcol25', 'appliedtotransaction');
//(can add more Custom Transaction Column Fields from the Sales Order here)
//perform search
var searchResults = nlapiSearchRecord('workorder', null, filters, columns);
//if there are results from the search, do the following:
if (searchResults){
//get value of the first search result's (there should be only one search result) to Custom Transaction Column Fields from the Sales Order
var myCustTransColFieldfromSO = searchResults[0].getValue('custcol25', 'appliedtotransaction');
//(can add more Custom Transaction Column Fields from the Sales Order here)
//set value of Custom Transaction Column Fields from the Sales Order onto the Custom Transaction Body Fields on the Work Order
wo.setFieldValue('custbody68', myCustTransColFieldfromSO);
//(can add more Custom Transaction Body Fields on the Work Order here)
//save the Work Order
nlapiSubmitRecord(wo);
}
}
}