Skip to content

Conversation

smartcarleen
Copy link
Contributor

Somehow I borked the code when submitting my pull request the other day. Since I had to fix it anyway, I spent some time refactoring this into a Client Callable Script Include instead of a Global Business Rule (which is the better way to do it anyway).

I updated the readme accordingly and also included a few screenshots to help illustrate usage. Feedback welcome!

This looping script traverses the User table from a certain point to get either one level of employees or all employees in the hierarchy underneath the logged-on user. There are two functions:
1. **getMyDirectReports**: gets only users directly reporting to the logged on user
1. **getMyReports**: gets all users reporting to the logged on user
…icFilters.xml

Removed XML for BR. I recommend that users create this new in their instance based on the details from the readme.
Updated readme to account for the shift to code to a Client Callable script include.
added screenshots to illustrate
@SapphicFire SapphicFire self-assigned this Oct 14, 2023
Copy link
Contributor

@SapphicFire SapphicFire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, appreciate the refactor too. Thanks for the contribution

@SapphicFire SapphicFire merged commit 46a37c9 into ServiceNowDevProgram:main Oct 14, 2023
@smartcarleen smartcarleen deleted the getMyReportsDynamicFilters branch October 16, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants