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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
Internal ID of CustomFieldRef
CustomFieldList cfl = customrec.getCustomFieldList(); CustomFieldRef[] cfr = cfl.getCustomField(); StringCustomFieldRef bankgironummer = null; for (int i = 0; i < cfr.length; i++) { bankgironummer = (StringCustomFieldRef) cfr[i]; if (bankgironummer.getInternalId().equals("custrecord_bankgironummer")) { break; } } My problem is that I want to be able to loop through cfr (an array of CustomFieldRef objects) and get their Internal IDs. When it matches with the desired Internal ID, I want to break.
I have not been able to find a method to get the Internal ID for a CustomFieldRef, so I'm forced to cast the object into a StringCustomFieldRef. This works fine as long as the Custom Field is a FreeForm Text field, but when I have other fields, for example a Custom Field with Integer it doesn't work.
0