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.
Iterate through each parent in a multi-level hierarchy of customers
I have customers, with sub-customers and sub-sub-customers, etc. I need to determine the customer id from EACH parent in the hierarchy. As an example, if I have Client Level 1: Client Level 1A: Client Level 1Aa and I know the value of the lowest level (Client Level 1Aa), I need to iterate through and determine the id of Client Level 1A and Client Level 1. When I ask for the id of the parent field, I get the top level id instead of the immediate parent. Is there another field or some code to determine the immediate parent?
0