Dynamics Search Engine

Monday, October 29, 2012

How to fix Best Practice error The Table.Field does not have a corresponding parm-method on the AxBC-class


How to fix Best Practice error The Table.Field does not have a corresponding parm-method on the AxBC-class

Applied on:
Microsoft Dynamics® AX 2012 Fpk.

Assumption:
This article is for those who has at least basic and programming
knowledge of Dynamics® AX.

About this article:
how to fix Best Practice error The Table.Field does not have a corresponding parm-method on the AxBC-class  when you create new field for existing table. E.g. InventTable, PurchTable, SalesTable etc.
BP Deviation for The Table.Field does not have a corresponding parm-method on the AxBC-class due to new field creation for tables. 

There are number of ways to achieve this. As per my view the easiest way is to execute a job. A sample job is mentioned below.

static void CreateAxBCParmMethod(Args _args)
{
    axGenerateAxBCClass axGenerateAxBCClass;

    axGenerateAxBCClass = AxGenerateAxBCClass::newTableId(tablenum(InventTable));
    axGenerateAxBCClass.run();

}

In the above job you can replace the table name instead of InventTable to create parm method as per your requirement.
The above job will generate method against new field created for InventTable.
Hope this article is useful.

 

No comments:

Post a Comment