最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

[转]Dynamics AX batch, permission rights

AX 2009 William 1619浏览 0评论

Dynamics AX 2009 – file and email right permissions in batch job.  Files to be read, written and deleted.  Email to be sent.

First step was to give the AOS service user rights to the file folder to be written.

As these were multiple files, permission sets were used.


void importFromWorkstation(MPSWorkstation _tWorkstation)
{
    int               iNumberOfFiles;
    FileName          sFileName,fileNamePerm, inFile;
    InteropPermission interopPerm;
    Set               permissionSet, permSetFiles;
    System.Array      files;
    int               i, j;
    container         fList;
    #File
    ;

    permissionSet = new Set(Types::Class);
    permissionSet.add(new InterOpPermission(InteropKind::ClrInterop));

    CodeAccessPermission::assertMultiple(permissionSet);

    files = System.IO.Directory::GetFiles(_tWorkstation.InDir, "*.ut");
    for( i=0; i

原文地址:http://orvarsig.blogspot.com/2011/10/dynamics-ax-batch-permission-rights.html

转载请注明:ww12345678 的部落格 | AX Helper » [转]Dynamics AX batch, permission rights

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址