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.
Transforming a Return Authorization -> Item Receipt
Perhaps I am going about this the wrong way - but what I would like to do is automatically generate the Item Receipt record when a particular user saves a new Return Authorization as they would only do this when customer/item is present so it is un-needed clicking to go through the process of manually clicking "Receive", ticking the boxes for the items, and then Save.
The code fired on a Return Authorization submit is:
var returnauthId = nlapiGetRecordId();
var recordType = nlapiGetRecordType();
if ((type == 'create') && (recordType == 'returnauthorization')) {
toRecord = 'itemreceipt';
itemreceipt = nlapiTransformRecord(recordType, returnauthId, toRecord);
itemreceipt.setFieldValue('landedcostmethod', 'WEIGHT');
itemreceipt.setFieldValue('landedcostsource1', 'MANUAL');