When I do a search.lookup for any customer that do...
# suitescript
e
When I do a search.lookup for any customer that doesn't have a parent... this bit of code returns an object with the same customer record as a parent of itself. Notice the ID I entered into the search.lookup is the same as the parent ID returned...
Copy code
let lookup = search.lookupFields({
  type: search.Type.CUSTOMER,
  id: 3641923,
  columns: 'parent'
});
let parent = lookup.parent;
console.log(parent); // Logs out { value: "3641923", text: "C0000000 Test Customer" }