Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
search.lookup options
Hello everyone,
I am trying to retrieve conversion rate from Units Type but getting the following error:
Any idea what the issue could be?
Thanks :)
The script is as below:
function validateLine(scriptContext) {
var currentRecord = scriptContext.currentRecord;
var sublistName = scriptContext.sublistId;
var sublistFieldName = scriptContext.fieldId;
var sublistName = 'item';
var sublistFieldName = 'units';
if(sublistName === 'item' && sublistFieldName === 'units'){
var soUnits = currentRecord.getCurrentSublistValue({
sublistId: 'item',
fieldId: 'units',
});
var fieldLookUp = search.lookupFields({
type: search.Type.UNITS_TYPE,
id: soUnits,
columns: ['conversionrate']
});
var Con_Rate= fieldLookUp.conversionrate[0].value
var SoQuantity = currentRecord.getCurrentSublistValue({
sublistId: 'item',
fieldId: 'quantity',
});
var totalPacks = SoQuantity*soUnits
currentRecord.setCurrentSublistValue({
sublistId: 'item',
fieldId: 'custcol13',