Hi is there any way to get the parent department in saved search created on the department?
j
jarens
02/08/2022, 3:57 PM
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.
jarens
02/08/2022, 3:57 PM
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
battk
02/08/2022, 6:56 PM
if you only need the name, you can infer it from the hierarchy in the name
👍 1
battk
02/08/2022, 6:56 PM
which you could also use to figure out the actual id if you get all the departments