Hi is there any way to get the parent department i...
# suitescript
s
Hi is there any way to get the parent department in saved search created on the department?
j
Someone might have a way to get it in the search itself. I don't see a way, looking briefly. An alternative would be to use the search to get all the internal id's of the departments and then do record.load and record.getValue('parent') on each.
Or you could add it again as a custom field on the department and set it via script or workflow. That would elevate it to visible on a search.
b
if you only need the name, you can infer it from the hierarchy in the name
👍 1
which you could also use to figure out the actual id if you get all the departments
otherwise its more sane to do a query