Using these forums I've found a solution to a customers request of IT-managers using service pages to view their organizations service calls. Unfortunately I don't saved the link for the solution I went for but with that as an example and then the webAPI examples I got what was needed.
Now however I'm stuck. The customer has a organization tree which has some managers that needs to see the whole tree's service calls.
It's not a multilayered organization but one big umbrella parent and several children. Each manager is part of one of the children.
It sounds easy to first check if the organization has a parent and then add that and all corresponding children to that organization to the service call filter. The problem is, I cannot get it to work. My limited knowledge in java is not helping.
Any tips? Or even better, is there anyone who can make a small script example on how to find the parent organization of a person and then loop through all children and add it to a filter?
HI the parent org you can get by next code: long oid; ApiSDSession session = ApiSDSession.openSession("", "", ""); IPerson person = session.getPersonHome().openPerson(oid); IOrganization org = person.getPersonOrganization(); IOrganization orgP = org.getParentOrganization();