Skip to main content

Posts

Showing posts from February, 2014

How to invisible formpart in Ax 2012

To invisible formpart in Ax 2012 you can try below code in Job. PartList partList; Counter partCnt; FormRun FormRun_part; NumberOf NoOfParts; super(); partList1 =new PartList(element); NoOfParts =partList1.partCount(); for (partCnt =1; partCnt <= NoOfParts; partCnt++) { FormRun_part =partList1.getPartById(partCnt); if (FormRun_part.name() ==formStr(YourFormName)) { FormRun_part.design().controlName("YourControlName").visible(false); } }

Invisible Factbox in Ax 2012

To make Invisible Factbox in Ax 2012 you can write code below in particular event as per your requirement. PartList       _partList  = new PartList(element); FormRun     _formRun; int                k; for (k = 1; k <= _partList.partCount(); k++) {       _formRun = _partList.getPartById(k);       _formRun.design().visible(false); }

Set Folder,File read,write Permission from AX

To Set Folder,File read,write Permission from AX you can try below code . Just you need to pass Domain,Folder  parameter in function as root and stFolder as mention in function below. void setAccess(str root, str stFolder) { System.Security.AccessControl.DirectorySecurity DirectorySec; System.IO.DirectoryInfo dirInformaiton; System.Security.AccessControl.FileSystemAccessRule FilesysaccessRule; System.Security.AccessControl.FileSystemRights fileSysRights; System.Security.AccessControl.AccessControlType accessControlType; UserInfo UserInfo; SHRDocuFolder LtabSHRDocuFolder; System.Security.AccessControl.InheritanceFlags inheritFlags; System.Security.AccessControl.PropagationFlags propFlags; ; dirInformaiton = new System.IO.DirectoryInfo(_root); DirectorySec = dirInformaiton.GetAccessControl(); fileSysRights = System.Security.AccessControl.FileSystemRights::Write; inheritFlags = System.Security.AccessControl.InheritanceFlags::ObjectInheri

New Modules Introduced in Axapta 2012

 Ax 2012 Modules Overview Account Payable Account Receivable  Budgeting  Cash and Bank Management  Compliance and internal control  Cost accounting  Fixed Assets General Ledger  Human Resource  Inventory and Warehouse management  Master Planning  Organization Administration  Procurement and Sourcing  Product Information Management  Production control  Project management and accounting  Sales and Marketing  Service management  System administration  Travel and Expense

Code to create file in folder in Axapta

You can create file in folder using below code in Axapta. Just type code in job and run that job then you can check test.txt file get created in temp folder of c drive. WinAPIServer::WS_FileCreate(@'c:\temp\test.txt'); In WinAPIServer class you can check code in bus layer in WS_FileCreate method. Com oFileSystem; COMVariant varFile; InteropPermission perm; boolean b; ; varFile = new COMVariant(COMVariantInOut::OUT, COMVariantType::VT_BSTR); varfile.bStr(_InFile); perm = new InteropPermission(InteropKind::ComInterop); if (perm == null) { return null; } perm.assert(); oFileSystem = new COM('Scripting.FileSystemObject'); return oFileSystem.CreateTextFile(varFile);

Error on Installing Ax 2012 Demo on personal Computer

Problem: You may face error during starting of Ax 2012 AOS service AX on the demo it tells you that the application object server is unavailable. check your configuration and network connection and try again so logically it's a service problem so when you check on the Object Server service You will see that it's status is Starting when it should be started or running when you want to restart it all the buttons are grey ! Solution: You need to check application path and database path. is it attached in server configuration correctly. You need  have administration rights. You need to log in with Admin only and try. If you running AX 2012 R2 it need 16GB ram as per Microsoft Curriculum. If RAM is below 16 GB then Its not a problem, it is because of RAM, You allow some time to it, it will start automatically.