Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Permission Denied for SqlDataDictionary

$
0
0

I am trying to truncate one of our tables in a class to run as a batch job, but keep getting a "Request for permission of type SqlDataDictionaryPermission failed. This is on an AX 4.0 system. I followed MSDN example on acquiring permissions and I am an admin. Here's the code:

   //Truncate table

   new SqlDataDictionaryPermission(

               methodstr(SqlDataDictionary, tableTruncate)).assert();

   sqlDict = new SqlDataDictionary();

   sqlDict.tableTruncate(tableNum(PMF_INVENTTABLEMODULELOG),false);

   CodeAccessPermission::revertAssert();

As I stated, I have admin access to this, so should have the required security key. Though this is displaying the (usr) environment in the class list.

Any help appreciated.


Viewing all articles
Browse latest Browse all 72043

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>