Skip to main content

Posts

Showing posts from January, 2012

How to call job to another job in MSD axapta using x++ code

How to call job to another job in axapta using x++ code 1. Create simple job job_test  and add it to action menu item in AOT. 2. Call job_test in other job using following code.    Args                    args;     ;         args = new Args();     args.name(identifierStr(Jobs_Test));     new menuFunction(menuItemActionStr(Jobs_Test), MenuItemType::Action).run(args); If you want to add job in action menuitem then just right click on aot menuitem on action type then create new menuitem. After that you can set that job in object selection property of menuitem.  You can not direction drag job to action menuitem.

Simple Example of using tables in Query in MSD axapta Reprts

Simple Example of using tables in Query in axapta Reprts     Query q;     QueryRun qr;     QueryBuildDatasource qbds;     QueryBuildRange qbr;    InventTable inventtab;     ;     q = new Query();     qbds = q.addDataSource(tablenum(InventTable));     qbr = qbds.addRange(fieldNum(InventTable,Status));     qbr.value(queryValue(NoYes::No));     qr = new SysQueryRun(q);     while(qr.next())     {     inventtab = qr.get(tableNum(InventTable));     info(inventtab.Itemid);     }

Code to send email with attachment using dynamics MSD axapta x++

Code to send email with attachment using dynamics axapta x++ void SendEMail() {     System.Net.Mail.MailMessage              Message;     System.Net.Mail.Attachment              attachment;     System.Net.Mail.AttachmentCollection    attachementCollection;     System.Net.Mail.SmtpClient              smtpClient;     System.Net.Mail.MailAddress             emailfrom;     System.Net.Mail.MailAddress             emailto;     str                                     messageBody ;     str                                     Subject;     str                                     SMTPServer;     str                                     Filenm;     FileIOPermission                        permission1;     ;     emailfrom = new System.Net.Mail.MailAddress(" From@xyz.com ","");     mailAddressTo = new System.Net.Mail.MailAddress(" To@abc.com ","");     messageBody = "This is test mail";     Subject = "Subject";     SMTPS

Add tables to query build datasource in MSDAX

Add tables to query build datasource ,addlink,relation static void QBDSExample(Args _args) { Query query; QueryBuildDatasource datasource; ; query = new Query(); // Add purchtable main datasource datasource = query.addDataSource(tableNum(purchtable)); // Add child datasource "purchline" datasource = datasource.addDataSource(tableNum(purchline)); // Set the join mode datasource.joinMode(JoinMode::InnerJoin); datasource.relations(false); datasource.addLink(fieldNum(purchtable, purchid), fieldNum(purchline, purchid)); info(query.xml()); }

How to get all table ids from AOT using dynamics MSD axapta x++ code

You can write following code  to get all table ids from AOT using dynamics axapta x++ language. Axapta is developed on .Net platform and its object base programming. You need to understand object concept before starting programming in axapta. You can declare object for tables,forms,reports,class,views etc . //variable declaration Dictionary dictionary1; TableId tableId1; ; // initialize object dictionary1 = new Dictionary(); // set initial table id tableId1 = dictionary.tableNext(0); // start table id loop while (tableId1) { info(int2str(tableId1)); tableId1 = dictionary1.tableNext(tableId1); } // end table id loop

Application Files Backup of Microsoft dynamics axapta

Application Files Back-up In Application file Backup, you will be taking back up of all the customizations you have made in the system. IMP: Please STOP the “Services” before taking Application Back-up. To stop the services follow the following process. 1. start > Run 2. type “services.msc” and press enter. 3. Following window will appear select the “Dynamics AX Object server 5.0$03-AXTEST service. 4. Right click on the service and select stop Similarly stop Dynamics AX Object Server 5.0$02-AXTEST service also. After Stopping service take backup of a. D:\Microsoft Dynamics AX\ Application\appl\AXTEST50 b. C:\Program file\Microsoft Dynamics AX\ Application\ appl\AXTEST c. Take one time backup of D:\Microsoft Dynamics AX\ Application\ appl\copy* It is recommended that after any customization backup of above folders is done after STOPPING THE SERVICES. After Doing all this please start the services which we have stopped earlier.

System.unauthorized access exception when using AX 4.0 Enterprise portal

The cause of these errors are due to the Business Connector Proxy and Internet Information Server (IIS) Application Pool owners having insufficient rights on the IIS Server. Resolution To Resolve the errors, you will need to: 1) Make sure the Business Connector Proxy user and the IIS Application Pool owner for the Enterprise Portal website match. 2) Add the Business Connector Proxy and IIS Application Pool owner to the following local Windows Groups on the IIS server: Power Users Performance Monitor Users group 3) Reset IIS (Click Start, Click Run, type: IIS Reset, and click 'ok'

Error Failed to register SharePoint services in MSD Axapta

Source: SharePOint Event ID:104 Description: Failed to register SharePoint services. An exception of type System.ArgumentException was thrown.   Additional exception information: Error during encryption or decryption. System error code 997. System.ArgumentException: Error during encryption or decryption. System error code 997.    at Microsoft.SharePoint.Administration.SPCredentialManager.DecryptWithMasterKey(Byte[] rgbEncryptedPassphrase)    at Microsoft.SharePoint.Administration.SPEncryptedString.GetSecureStringValue()    at Microsoft.SharePoint.Administration.SPEncryptedString.get_SecureStringValue()    at Microsoft.SharePoint.Administration.SPProcessIdentity.get_SecurePassword()    at Microsoft.SharePoint.Administration.SPProcessIdentity.Provision()    at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.ProvisionCredentials()    at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Provision(Boolean start)    at Microsoft.SharePoint

SharePoint Central Administration Pool properties setting in MSD axapta

SharePoint Central Administration Pool properties setting 1) Go to Start>Administrative tools>Internet Information Services(IIS) Manager 2) Open Application Pools 3) Right click "SharePoint Central Administration" and choose "Properties" 4) Go to Identity page 5) Choose "Predefined" "Network Service" and click [Apply] and [OK 6) Right click "SharePoint Central Administration" and choose "Recycle"

List of Software’s Required for Installation of AX 4.0 in MSD Axapta Enterprise Portal

Below is the List of Software’s Required for Installation of AX 4.0 and Enterprise Portal: Software Required for Installation of AX 4.0: Windows Server 2003 (with Active Directory Structure Installed) (Product CD) SQL Server 2005 / SQL Server 2000 with SP4 (Product CD) AX 4.0 (Product CD) Windows Installer 3.0 Internet Explorer 6.0 with SP2 or later Software Required for Installation of AX Enterprise Portal: Windows SharePoint Services 3.0 .NET Framework 3.0 Microsoft Internet Information System 6.0

Error Not enough right to use table Abc in MSD Axapta

If you are facing this error like Error  Not enough right to use table ABC that means its configuration problem just go to menu Administration > Setup > System > Configuration  and check tick and no tick check box for particular module or tables. Once you selected your module then it will go for synchronization process. Once its done then  you can check your tables and changes in AOT. I hope this will help you to solve this error.

Code to import XPO file to AOT in Microsoft dynamics axapta

Summary: If you want to  import XPO file to AOT in Microsoft dynamics axapta x++ applications through code then you can write following job in job sections of Axapta Details static void ImportXPOthroughJob(Args _args) { SysImportElements sysImportElmt1 = new SysImportElements(); ; sysImportElmt1.newFile("E:\\test.xpo");// This is to assign path of XPO filename sysImportElmt1.parmImportAot(true); sysImportElmt1.parmImportWithIds(false);//This to import without using xpo object ids sysImportElmt1.import(); }

Keywords for Microsoft dyanmics axapta lovers

Some keyword list for microsoft dyanmics axapta lovers Summary: These are keyword list which is related to micorsoft dynamics axapta ERP using language x++. If you are daily blogger then you can use these keywords for your blog also. using macro axapta dynamics ax posting invoice flow disabling the route category in Axapta 2009 dynamics ax section group one page ax lookup field language dynamics ax validatedelete on datasource code developer jpg dynamics ax sleep 100 invoice journal set permissions ax how to uncheck mandatory credit limit from ax 2009 how to remove all mandatory credit limit from ax 2009 dynamics ax exist join dynamics ax 2009 timezones import purchase orders dynamics ax report execute method  how to handle import purchase order functionality in microsoft dynamics ax which includes duty, insu  x++ string compare  dynamics ax+commaio read  ax query range wildcard  x++ lookup report dialog  dynamics ax runbase tutorial dynamics ax checkfailed e

Create Web Modules in Enterprise portal in MSD axapta

Create Web Modules in Enterprise portal in axapta 1. Create your module as a sub module to Home. Do not create it as a sibling to Home module. 2. Set the Quick-launch and MenuItemName property. Both are required for the module to work 3. To get this new module in an existing EP site, mark that EP site as the Dev AOT site in the websites form in AX client and right click on the newly created module and deploy. Note you can only deploy the web module once. It won’t redeploy if that subsite already exists. 4. After deploying reset IIS and AOS for it to appear in the top nav.