Friday, June 4, 2010

Ax 2009: Deleted alert records are shown in the Unified Worklist web part

When users delete alert records, the records continue to display in the unified worklist on the users Role Center page. When records in EventInbox are deleted, they are not always physically removed from the database. If the ''SendEmail'' field is selected, then the records are soft deleted. In such a case the ''Deleted'' field is flagged and the record is update. When the ”SendEmail” field is false, the records would instead be removed from the database. This is an after effect of the Data Set used by the worklist using the following query when building its temporary table.
This is from line 64 of \Data Sets\UnifiedWorkListTmp\Data Sources\TmpUnifiedWorkList\Methods\init.
while select alert where alert.UserId == curuserid()

This issue can easily be worked around by implementing the code as shown below. This code this prevents the worklist from displaying alerts that users have deleted.

while select alert where alert.UserId == curuserid() && alert.Deleted == false
Ensure to restart the AOS so that any cached records can be cleared. Also recommended but not required is an IIS reset to a obtain a new IIS application pool and .NET BC.

0 yorum:

Post a Comment