Surface current Out of Office Settings

  • 29 January 2019
  • 2 replies
  • 3 views

Hi,

 

I'm looking for a way to surface a users current Out-Of-Office-Settings.

Now, let me preface this by saying:

I am not trying to change anything in the database. This is purely Getters. I need to display the information, not interact with it!

 

Looking at the DB:

I can find the default representative by navigating through Server.WorkTypeShare, Server.WorkType and Server.Actioner showing only the results for Server.Actioner.Status = 1 to filter on users witch active Out-Of-Office.

 

I can even find the exceptions through Server.WorkTypeExceptionShare, Server.WorkTypeException, Server.WorkType and Server.Actioner. Hoever I only get a mean looking string in the condition field. I'm missing a way to find out what Process/Activity the excption is for.


2 replies

Userlevel 4
Badge +13

Hi,


 


I'll like to share a query that retrieves the out of office settings:  


 


Select    'OOF Setup FOR: [' + [A1].ActionerName + '] TO: [' + [A2].ActionerName + ']' as OOF,
'[' + [A1].ActionerName + '] Status is: ' + CASE WHEN [A1].Status = 1 THEN '[OUT of Office]' ELSE '[IN Office]' END as Status
From [Server].[Actioner] [A1]
Join [Server].[ActionerShare] [as] On [as].ActionerID = [A1].[id]
Join [Server].[ActionerShareWorktype] [aswt] On [aswt].ActionerShareID = [as].[id]
Join [Server].[Worktype] [wt] On [wt].[id] = [aswt].WorktypeID
Join [Server].[WorktypeShare] [wts] On [wts].WorktypeID = [wt].[id]
Join [Server].[Actioner] [A2] On [A2].[id] = [wts].ActionerID
order by OOF

 

Hi lkimberly,

 

thank you for the snippet!

This does indeed display the correct default redirect and status!

You wouldn't happen to know of a way to surface the exceptions as well, would you?

Reply