Friday, February 10, 2012

Bank Deposite, Payment has been cancelled

While Canceling Payment by system through Customer Transaction (Account Receivable>customer detail>Transactions>Cancel Payment)
Error accoured : "Payment xxxxxxxx has already been canceled"
Solution:
1. Open BankDeposite Table
2. Change MaxAccessMode property of table from View to EDIT
3.Find out the DepositeNum (which mention in Error)
4.Untick the field Cancelled
5.That's done. Now save the table and again change the MaxAccessMode to View

Thnx

Wednesday, February 8, 2012

AX 2009 Workflows: A Quick overview

Here is a quick overview on AX 2009 Workflow...a feature long awaited :)

Workflow - "Machine readible code for a business process"-Feature of Base AX 2009
-Workflow components reside on a Web Server
-Utilizes the Windows orkflow Foundation (.NET 3.0)
-Utilizes the AX Batch framework
-Requires AD User for Workflow
-Requires exclusive site on IIS to function
-The Workflow components on the Web server use the .NET BC to communicate with the AOS using Workflow system account(existing AX user).
Architecture overview:-


Setup (Steps):-
-Setup AD User for Workflow Account & configure in AX
-Setup & Configure IIS on Web Server
-Setup Workflow Component using AX installation option
-Run the Workflow Infrastructure Configuration Wizard {Batch Jobs, Workflow site}
-Configure the Workflow in AX
Workflow Objects:
Workflow templates:
Workflow templates capture information about workflow categories , what business document the workflow will operate over, what workflow elements (Tasks and Approvals) are required in the workflow configuration,which application event handlers will handle the events that are raised as the workflow executes etc.The first step in creating a workflow is to add a workflow Template. A Workflow Template can be said to be the metadata A workflow template provides information on:
• Which workflow document to use.
• Tasks and approvals that can be configured by the user.
• Workflow categories used for assigning a workflow template to a specific module.
Workflow category:
The workflow category determines whether a workflow template is available in a specific module. After a workflow
category is created, it is possible bind the workflow category to a workflow template.


Workflow Configuration:
A Workflow Configuration is bound to a single Workflow Template, and there can be multiple Workflow Configurations
for the same Workflow Template. Only a single Workflow Configuration for each WorkflowTemplate can be the default WorkflowConfiguration. The Workflow Configuration captures what tasks will be executed, who the tasks are assigned
to.
Workflow Query:
Dynamics AX workflow uses a query to set up conditions for a workflow. The query identifies which data is available to workflow users. Queries are bound to Workflow templates. Once the query is created, a Workflow class needs to be created which contains the query name & any calculated fields.
Workflow Tasks:
AX workflow tasks are used to track documents or tasks from the start to the end of a work process. A workflow may
contain one or many tasks. Each task contain one step.

Workflow Approvals:
Workflow Approvals are used to track ststus of Workflow documents . The fixed outcomes are ‘Approve’, ‘Reject’, or
‘Request Change’.

After you create a task, approval, or outcome in a AX workflow, it must be added to a menu item. The end-user can then start the task or approval using the menu item as a part of the workflow process.
Workflow can be activated throughout the various lifecycle stages of a business document: Create, Update, Delete, Post. The Workflow runtime will execute the Workflow and assign Tasks to users. Users interact with theWorkflow through Alerts/Workflow Tasks, from where they can take action (Approve, Reject) or they can navigate to the business document and view all details before taking the workflow action.
Apart from these basic concepts, there are concepts like Implement Providers, Event Handlers which I will explain in a later post.

Tuesday, February 7, 2012

HTTP Error 404.17 - Not Found

HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Error in IIS 7.0

This Problem occures due to installation of .NET Framework 4.0 is available on your machine.
Solution:
You can back up your web.config and web content, then revert your site's mappings to parent's, it should work for you
IIS Manager->high-light you web site->click Handler Mappings icon on the home pane->click Revert to Inherited... on the right Actions pane.

Thnx

Thursday, December 29, 2011

Update Records of Table With While Loop

If we have to update the records of the table one by one we should have to follow the syntax as below:

1. Get the records from the tables
2. Start While loop with the table
3.Write code to update the record (Or anything you have to with record)
4.At the End of While Loop Next TableName.
----------------------------------------------------------------------------
Syntax:

tablename = get records form table

while(tablename)
{
    tablename.fieldname=value;
   
    tablename.Update();

    Next Tablename;
}
------------------------------------------------------------------------------
Example:

salesTable  = SalesTable::custOpenOrders(this.AccountNum,true);
while (salesTable)
{
        if (salesTable.CurrencyCode == origCurrencyCode)
        {
            salesTable.convertCurrencyCode(this.Currency);
            salesTable.update();
        }
        next salesTable;
}

Friday, December 16, 2011

Remove red hand In vendors transactions

Following are the steps for removing "RED HAND FROM VENDOR TRANSACTION"

1. In vendor detail form select that particular vendor and note information like voucher,date,amount
2. Open VendTransOpen table
3. Select that vendor and note RecId
4. Open SpecTrans table
5. Select RefRecid of that RecId
6. Delete that record from table

Thursday, December 15, 2011

Dynamics AX 2009 - Calling X++ logic from SSRS and C#

Recently I wrote the following blog entry:
Calling a Custom Dynamics AX 2009 SSRS report and passing parameters - From X++

This was to address a set of questions from a reader, where he stated it was not clear about how to call a report from X++ and send in parameter data. The above post, shows you exactly how to do that.

This is the blog entry, in which those comments where left.:
Dynamics AX 2009 - Reporting Possibilites

The next thing in the readers comments, was making use of display methods, or methods in general from X++. This also can be done, an there is great examples of this through some of the out of the box Report's, and also the new Environmental Dashboard that came out during the spring.

I am going to pull from the environmental dashboard, and show an example of this being used.

So if we open our reports project, we will see something similar as follows, and notice the report, has a section for data methods.



Looking at these data methods that are part of the EnergyCost report, we see we have this one, with some parameters / variables that need to be sent in.

On double clicking of the method, takes us to the Business Logic section, and we see our C# code here, along with the .Net Business Connector Assembly, and AxaptaWrapper Object being used.



As you can see we have access to make calls to static methods, and normal non-static business logic. So this could easily be changed and made use of as a template for working with X++ methods, that we need access to for our report purposes.

Now moving back to the report design, I have highlighted the field in the report design, which happens to be a Matrix Cell, that makes use of this datamethod. The expression where this data method is called, is the following.:



=Cdbl(GetEnergyCost(Fields!SourceProcessId.Value, Fields!DestinationProcessId.Value, Fields!SubstanceId.Value, Parameters!EnergyCost_Filter.Value))


So we can see our datamethod being called, to fill this field, and see how the parameters are being sent in. Even one being referenced from the parameters that are sent in to this report.

This is a really good example, that can be expanded upon, and used as a template for such custom needs of datamethods, and access X++ business logic and display methods for a Dynamics AX 2009 SSRS Report.

I hope this helps, and look for more soon. See you next time!