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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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