Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
getFieldValues and getFieldTexts returning in different orders
I have a multiple select field on cases that has the list/record set to transactions.
I'm trying to pull some information onto the case from these transactions. Thought I figured out a clever way to grab the transaction's ids and types... but it's proving to be difficult.
Here's the pertinent part of what I've got:
var rec = nlapiGetNewRecord(); //load the case var Caseid = rec.getId(); //return ID var CaseRR = rec.getFieldValues('custeventcaseforordernumber'); //return related transactions var CaseRRtypes = rec.getFieldTexts('custeventcaseforordernumber'); for (var i = 0; i < CaseRR.length; i++) { var rrID = CaseRR[i]; var RRtype = CaseRRtypes[i].replace(/[^(Purchase)][^(Sale)][^(Order)][^(Vendor)][^(return)][^(authorization)]/g, "").replace(/[^a-zA-Z]/g, "").toLowerCase(); var RRrec = nlapiLoadRecord(RRtype, rrID ); //load the related record }; 0