Dynamics AX
  RSS Feed  LinkedIn  Twitter
Want to turn you're data into a true asset? Ready to break free from the report factory?
Ready to gain true insights that are action focused for truly data informed decisions?
Want to do all of this across mutliple companies, instances of Dynamics and your other investments?
Hillstar Business Intelligence is the answer then! (www.HillstarBI.com)

Hillstar Business Intelligence for Microsoft Dynamics AX and NAV on Mobile, Desktop, Tablet


Let us prove to you how we can take the complexity out of the schema and truly enable users to answer the needed questions to run your business! Visit Hillstar Business Solutions at: www.HillstarBI.com

Wednesday, December 12, 2007

SysDictClass and some CAS

I ran into an issue when working with the SysDictClass. I am using this to do some 'smart' coding and make use of reflection, in order to speed up my development and not have to manually write code over and over again for the same type of thing. In doing so, I found out that this is considered a protected API now in DAX 4.0, and so you need to make use of an 'ExecutePermission' CAS Permission object, and assert that level of permission.

The error message looked similar to this:

"Request for the permission of type 'ExecutePermission' failed.
(S)\Classes\ExecutePermission\demand
(S)\Classes\DictClass\callObject
..."


So if you see this type of error, then make sure you perform an ExecutePermission Object. assert() before the code, and revert that assertion after the code block. In doing so, you will have gotten rid of this little issue.

This is the first time I had to make use of this code in a while, and so first time I ran into this being a protected API. I hope this helps someone out, as I did not find anything on the web, when searching.

Check back soon!


Find a job at: www.DynamicsAXJobs.com

Labels: , , , , , , ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home


Copyright 2005-2011, J. Brandon George - All rights Reserved