OverwriteSystemFields faild

In Dynamics Ax 2009 i need to set a different createdDate in a table, but I cant get the overWriteSystemFields method to work. I get this error

Request for the permission of type 'OverwriteSystemfieldsPermission' failed.
(S)\Classes\OverwriteSystemfieldsPermission\demand
(S)\Classes\xRecord\overwriteSystemfields
(C)\Classes\importDocuRef\run - line 34
(C)\Classes\importDocuRef\main - line 7

I tried the same code in Axapta 3.0 where it works just fine. Can it be something wrong with my configuration?