Microsoft Dynamics GP has an automatic delegation feature for users that are going to be out of the office.  (Home >> User Preferences >> Workflow Delegation button)  You can use the Workflow User Delegation window to delegate, or reassign, tasks to other approversand you can select which workflow types to delegate, enter a starting and ending date for the delegation, and assign the workflow types to another user.

This is an awesome feature that not everyone is aware of. This feature uses a SQL Job so it will only function if your SQL Server Agent is running. Each night it will run to remove expired delegations. There have been a few instances reported of users having issues with this. The SQL job is removing all delegations instead of only the expired ones so users who have their Out of Office delegation set to more than one day will get wiped out.

I wanted to provide this simple workaround which can use if you are seeing this issue in your environment.  

1.  Disable the SQL Job ‘Scan For Invalid AD Users and Expired Delegations For All Companies’ in SSMS by right clicking it and choosing disable.

2.  Right Click on the ‘Jobs’ folder in the screenshot above and click ‘New Job’

3.  In the General Tab, enter a name and description.

4.  Under the Steps tab click ‘New’

  • Select your company database, and paste the following SQL query into the command box.

delete  WF40510 where ENDDATE < SYSDATETIME()

delete  WF40500 where UsersListGuid not in (select UsersListGuid from WF40510) 

5.  Click ‘OK’

6.  Click the ‘Schedules’ tab and click ‘New’

  • Select Occurs: Daily
  • I would recommend running this at 12:01am

7.  If you have multiple companies, you will need to set this up for each one.

I hope this article both creates awareness of this feature which not all users know about, and also gives you a quick solution if you should run into any issues with automatic delegations getting removed at night than you were not expecting.