web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

DictSecurityKey is deprecated

Vilmos Kintera Profile Picture Vilmos Kintera 46,149

In the new Microsoft Dynamics 365 Finance and Operations release a lot of things have changed in terms of reflection. One of them that we have used frequently for security access validation is gone, DictSecurityKey is deprecated.

You can find a list of still available classes which are mostly used against AOT objects here:

https://docs.microsoft.com/en-us/dotnet/api/dynamics.ax.application

For example when you wanted to hide a tab on a form in X++, you could just use reflection to do the validation like this:

dictSecurityKey = new DictSecurityKey(buildTabpage.securityKey());
(dictSecurityKey && dictSecurityKey.rights() != AccessType::Delete));

The security framework has been improved/redesigned in D365FO, and now you can achieve the same with the following code:

SecurityRights  securityRights = SecurityRights::construct();
securityRights.formControlAccessRight(form.name(classId2Name(classIdGet(this))), buildTabpage.name()) != AccessRight::Delete;

The post DictSecurityKey is deprecated appeared first on DAXRunBase.

Comments

*This post is locked for comments