Posts

Showing posts from August, 2016

Commands to Export and Import Model in Dynamics ax 2012

Hello guys,the following commands will help you to import and export model in ax 2012. Export Model : ---------------------- On the Start menu, point to All Programs, point to Administrative Tools, and then click Microsoft Dynamics AX Management Shell. At the Windows PowerShell command prompt, PS C:\>, type one of the following commands, and then press ENTER. Export-AXModel  -Model <name> -File <Filename.axmodel> Example:Export-AXModel  -Model TestModel -File D:\\models\testmodel.axmodel Here,TestModel is model name. Import Model ; -------------------------- Install-AXModel -File <Filename.axmodel> -Details or Install-AXModel -File <Filename.axmodel> -Details  -Conflict Push Example:C:> Install-AXModel -File    D:\\models\testmodel.axmodel  -Details Command to get list of models installed: ----------------------------------------------------- axutil  list Example:C:>axutil list  Comma...

Multiple calls to CodeAccessPermission.Assert error in ax 2012

Hello guys,maximum people will write their code like below statements to create 2 text files at a time. /* fileIOPermission = new FileIOPermission(filename,'w'); fileIOPermission.assert(); textIo = new TextIo(filename, 'w'); fileIOPermission1 = new FileIOPermission(filename1,'W'); fileIOPermission1.assert(); textIo1 = new TextIo(filename1, 'w'); */ The above statements will create a problem like"Multiple calls to CodeAccessPermission.Assert ". To solve,Please change your code as below. static void Job21(Args _args) {           Set   permissionSet;         TextIo    textIo,textIo1;         str filename,filename1;         filename = @'D;\testfile1.txt';         filename1=@'D:\testfile2.txt';         //creating Set Class Object of type class.         permissionSet = new Set(Types::Class);   ...