Comparing a user's department against the current Business Owning BU or Platform of a business app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
In the Service Catalogue, I'm trying to create a new catalogue item for maintaining a business application. The requirement is that if the user proposes a change to the Business Owner then check the 'Department' field on the new owner's User record.
If the path to this department does not align to the current Business Owning BU or Business owning Platform then inform the user that the proposed business owner does not sit within the current Business owning Business Unit and/or Platform.
I've tried to build the logic in a script include and client script. However, even if the new owner's department is correctly align the below message still appears.
I'm using the following functions in my script include:
The code in my client script is:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
That's a lot to trace through and digest starting from no previous knowledge of the process. Like any scripts, you can start to troubleshoot this yourself by adding alerts / gs.info/gs.addInfoMessage lines to the scripts to confirm what is running, the values passed between the two, and you'll see which if conditions are met. If this process doesn't reveal the logic or syntax error, post where you're stuck / what test is not making sense from what you see in log and we'll get it sorted.
