Sunday, July 29, 2012

How to display object Models in Axapta 2012

With many new things coming with AX 2012 like models, we sometimes need to check to which model the current object belongs to. I know how important this is because when it comes to check in the objects, it creates problems if the objects are connected to a different Model.
1.       Click on development environment of AX 2012.
2.       Click on tools->options
3.       To the left you will see Development tab, click on it.
4.       Check out the right side, you will find Application Object Tree, expand it.
5.       From Application Object Model you need  to select Show all elements  and click on Apply

Wednesday, July 11, 2012

The AOS server cannot be reached error

while installing SQL Server Reporting Services by AX installer I got below error. I recently made my machine to point to a new server.
“The AOS ‘MicrosoftDynamicsAX@servername@portnum’ cannot be reached. Setup cannot continue. Verify that you entered the correct server information and that the AOS service is running.”



It was clearly pointing to the  old server. Then I tried to check the Microsoft AX server configuration which contained my new server path, also checked the client configuration which was again pointing to the new server. However the ‘Business proxy account’ was still pointing to the old server. So changed that to the new server and it worked like a charm :)

If you are installing Report services extensions and getting above error then follow below steps:


  1. In Microsoft Dynamics AX go to System Administration, click Setup, click System, and then click System service account.  
  2. Check the business proxy account, it must be a dedicated BC account different from the one you are using for setup.

Thursday, February 16, 2012

How to send AIF Inbound and Outbound messages manually

Inbound:
static void RunAIFInbound(Args _args)
{
    ;
    // read the messages
    new AifGateWayReceiveService().run();
    // process the messages in queue
    new AifInboundProcessingService().run();
    info("done");
}

Outbound:

static void  RunAIFOutbound(Args _args)
{
    ;
    // process messages in queue
    new AifOutboundProcessingService().run();
    // send messages
    new AifGateWaySendService().run();
    info("done");
}

Tuesday, January 17, 2012

How to disable a query range from user

Sometimes we do not want the user to change the query range on a form or a  report.
To hide this from user, we need to write the following code for the range of the query.
In my case I have written a queryrange on the init() method of the datasource in a form.


    queryRange = this.query().dataSourceTable(TableNum(CustTable))
                          .addRange(fieldnum(CustTable,CustStatus));
    queryRange .value('close');
    //to make the field uneditable use the following code
    queryRange .status(1);



 Reference: http://support.microsoft.com/kb/910958