AX – D365FO – Delete Usage Data (SysLastValue) in X++

In this example we delete the usage data for Class called “TaxReport” of the current user.

SysLastValue                    sysLastValue;

delete_from sysLastValue
where sysLastValue.RecordType == UtilElementType::Class
 && sysLastValue.userId == curUserId()
 && sysLastValue.elementName == 'TaxReport';

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s