Pages

Wednesday, October 26, 2016

AX7 on Oracle VirtualBox

I have started my advetures with AX7 today on my local machine.

To make things working you need:
  1. Set Virtualization on your CPU enabled
  2. Application where you can run VHD images. I have choosen VirtualBox from Oracle
  3. AX7 VHD Image
  4. Account on Office365
At first, check your settings in bios. Make you Virtualization Enabled. For me it is Intel Virtualization Technology.

Now following steps. Create virtual machine by pressing New.


Name it. In this case it is ax7.


 As much RAM as you can add is nice to have.


Select your VHD image.
 

Press Start button to run virtual machine. It will take some time to initiate windows. 

After some time you should see standard login prompt. Type password: pass@word1



















Run As Administrator Provisioning tool, type your Office 365 account and press Submit.
After some time you will be granted to administrator.




























Open IE. You will find this address. Open it. Login with your Office 365 credentials.




Once you have issues with login with your Office365 account try below trick:
  1. Start Visual Studio as Administrator
  2. Find in AOT CustTable Form for example
  3. Right click on it and Add to new project. 
  4. In your project right click on CustTable form and Set as startup object
  5. Go to Debug  and press Start without debugging




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.