Pages

Showing posts with label Dynamics AX. Show all posts
Showing posts with label Dynamics AX. Show all posts

Monday, October 10, 2016

Upload blob data in AX. BinData class.

I would like to present you very user full class which is avaiable in 4, 2009 and 2012 versions of AX.

Everytime you have to work with blob type data in just few lines you can load and save fille in AX in container type field. Works on client and server side.

Below you can see example of how to load file to container and back, form container to file:

    BinData             binary;
    FilePath            filePath;
    FileIoPermission    perm;
    container           con;
    ;

    filePath = @"c:\temp\from.jpg";
    binary = new BinData();
    perm = new FileIoPermission(filePath, 'rw');
    perm.assert();
    binary.loadFile(filePath);
    con = binary.getData();
      
    binary.setData(con);
    binary.saveFile(@"c:\temp\to.jpg");


Please check MSDN to see more sources where from you can read and save data to.

Sunday, September 18, 2016

How to start workflow in AX2012

If you would like to start workflow in your AX2012 instance do following steps:

1. Create tree batch groups.


Remeber to add proper AOS servers on Batch Servers tab.






















Please, check as well if you have configured user for workflow in Workflow execution account. As you can see I have the same acccount as Business Connector. This is Ok for DEV/TEST enviroments. On LIVE I reccoment to have separate account for workflows.

























2. Run Wizard. You can find it at System administration\Setup\Workflow\Workflow infrastructure configuration. Press Next and in every page select created previously batch group. Setup time periods in which you would like to have Workflow working.


3. You should see new workflow batch jobs. If yes, then all goes OK.

Workflow will not work if CIL won't be fully compiled without any errors.