Discussion:
best practice error
(too old to reply)
Huzaifa Gain
2008-07-08 22:50:01 UTC
Permalink
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
Mykola Galak
2008-07-09 06:45:01 UTC
Permalink
Hi,

This is caused by new BP rules introduced in 5.0. These parm/exists methods
are used by business connector. To generate them simply run following job:

static void GenerateAxBC(Args _args)
{
axGenerateAxBCClass axGenerateAxBCClass;
;

axGenerateAxBCClass =
AxGenerateAxBCClass::newTableId(tablenum(WMSOrderTrans));
axGenerateAxBCClass.run();
}


Mykola
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
Huzaifa Gain
2008-07-14 01:21:00 UTC
Permalink
thanks , but after getting rid of this best practice error i am stuck wuth
"Data object class CustFreeTextInvoice_CustInvoiceLine is missing method
existsAmountDetails." is there any class to remove this error too.
Post by Mykola Galak
Hi,
This is caused by new BP rules introduced in 5.0. These parm/exists methods
static void GenerateAxBC(Args _args)
{
axGenerateAxBCClass axGenerateAxBCClass;
;
axGenerateAxBCClass =
AxGenerateAxBCClass::newTableId(tablenum(WMSOrderTrans));
axGenerateAxBCClass.run();
}
Mykola
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
unknown
2008-07-09 06:53:01 UTC
Permalink
You can remove the best practice error either by generating these methods
(see Mykola's code for this OR do it from the Tools\Development
Tools\Application Integration Framework\Update document service)

the other option is to turn off this validation, if you are not using Axd
documents and AIF in your installation.
You can do that from the Best Practice Parameters (open them from
Tools\Options\Best Practices).
Simply remove the check-mark from the Application Integration Framework node
or the sub-node (this is actually what triggers this validation). It has a
description of what the check does, by the way
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
Mykola Galak
2008-07-09 09:16:00 UTC
Permalink
It is not really good idea to turn off BP verification for AIF. Even if you
are not using AIF now. Probably in the future one will need this
functionality or customer will use BP verification as solution acceptance
criteria.

In case you are 100% sure that you will never use AIF it is better to
include additional rules to SysBPCheckIgnore macro instead of turning off BP
verification.

Mykola
Post by unknown
You can remove the best practice error either by generating these methods
(see Mykola's code for this OR do it from the Tools\Development
Tools\Application Integration Framework\Update document service)
the other option is to turn off this validation, if you are not using Axd
documents and AIF in your installation.
You can do that from the Best Practice Parameters (open them from
Tools\Options\Best Practices).
Simply remove the check-mark from the Application Integration Framework node
or the sub-node (this is actually what triggers this validation). It has a
description of what the check does, by the way
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
Huzaifa Gain
2008-07-14 02:07:00 UTC
Permalink
thanks , but after getting rid of this best practice error i am stuck wuth
"Data object class CustFreeTextInvoice_CustInvoiceLine is missing method
existsAmountDetails." is there any class to remove this error too
Post by Mykola Galak
It is not really good idea to turn off BP verification for AIF. Even if you
are not using AIF now. Probably in the future one will need this
functionality or customer will use BP verification as solution acceptance
criteria.
In case you are 100% sure that you will never use AIF it is better to
include additional rules to SysBPCheckIgnore macro instead of turning off BP
verification.
Mykola
Post by unknown
You can remove the best practice error either by generating these methods
(see Mykola's code for this OR do it from the Tools\Development
Tools\Application Integration Framework\Update document service)
the other option is to turn off this validation, if you are not using Axd
documents and AIF in your installation.
You can do that from the Best Practice Parameters (open them from
Tools\Options\Best Practices).
Simply remove the check-mark from the Application Integration Framework node
or the sub-node (this is actually what triggers this validation). It has a
description of what the check does, by the way
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
Mykola Galak
2008-07-14 06:16:01 UTC
Permalink
As Vanya wrote earlier, you can you use Update document service from menu or
use this job:

static void GenerateParmExist(Args _args)
{
AfDataContainerClassGenerator AfDataContainerClassGenerator = new
AfDataContainerClassGenerator();
Dialog dialog;
DialogField dialogClassName;

AfStronglyTypedDataContainer dataContainer;
AfDataContainerDescriptor dataContainerDescriptor;
SysDictClass dictClass;
str className;
;

dialog = new Dialog("Create parm and exists methods");
dialogClassName = dialog.addField(typeid(ClassName), "Class name");

dialog.run();
if (dialog.closedOk())
{
className = dialogClassName.value();

dictClass = new dictClass(className2Id(className));
dataContainer = dictClass.makeObject();
dataContainerDescriptor = dataContainer.wt().get_Descriptor();


AfDataContainerClassGenerator.parmDataContainerType(dataContainerDescriptor.get_Type());

AfDataContainerClassGenerator.parmDataContainerTypeMacroLibName(dataContainerDescriptor.get_DataSourceName());
AfDataContainerClassGenerator.parmClassName(className);
AfDataContainerClassGenerator.parmBaseClassName(className);
AfDataContainerClassGenerator.generate();
}
}


Also you have to comment to lines of
ClassesAfDataContainerClassGenerator->addCustomCode:

protected void addCustomCode()
{
// this.addDataContainerTypeMacro();
// this.addNewMethod();
this.addDataItemMethods();
}

Next step is to include this automatic BP error fix to BP check routine.

Mykola
Post by Huzaifa Gain
thanks , but after getting rid of this best practice error i am stuck wuth
"Data object class CustFreeTextInvoice_CustInvoiceLine is missing method
existsAmountDetails." is there any class to remove this error too
Post by Mykola Galak
It is not really good idea to turn off BP verification for AIF. Even if you
are not using AIF now. Probably in the future one will need this
functionality or customer will use BP verification as solution acceptance
criteria.
In case you are 100% sure that you will never use AIF it is better to
include additional rules to SysBPCheckIgnore macro instead of turning off BP
verification.
Mykola
Post by unknown
You can remove the best practice error either by generating these methods
(see Mykola's code for this OR do it from the Tools\Development
Tools\Application Integration Framework\Update document service)
the other option is to turn off this validation, if you are not using Axd
documents and AIF in your installation.
You can do that from the Best Practice Parameters (open them from
Tools\Options\Best Practices).
Simply remove the check-mark from the Application Integration Framework node
or the sub-node (this is actually what triggers this validation). It has a
description of what the check does, by the way
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
dolpho
2010-04-23 15:11:01 UTC
Permalink
I tried this fix and now I am getting data object class
InventItem_InventTable has extra method exists errors for exists and parm
methods. Any suggestions what to do to fix the issue?
Post by Mykola Galak
As Vanya wrote earlier, you can you use Update document service from menu or
static void GenerateParmExist(Args _args)
{
AfDataContainerClassGenerator AfDataContainerClassGenerator = new
AfDataContainerClassGenerator();
Dialog dialog;
DialogField dialogClassName;
AfStronglyTypedDataContainer dataContainer;
AfDataContainerDescriptor dataContainerDescriptor;
SysDictClass dictClass;
str className;
;
dialog = new Dialog("Create parm and exists methods");
dialogClassName = dialog.addField(typeid(ClassName), "Class name");
dialog.run();
if (dialog.closedOk())
{
className = dialogClassName.value();
dictClass = new dictClass(className2Id(className));
dataContainer = dictClass.makeObject();
dataContainerDescriptor = dataContainer.wt().get_Descriptor();
AfDataContainerClassGenerator.parmDataContainerType(dataContainerDescriptor.get_Type());
AfDataContainerClassGenerator.parmDataContainerTypeMacroLibName(dataContainerDescriptor.get_DataSourceName());
AfDataContainerClassGenerator.parmClassName(className);
AfDataContainerClassGenerator.parmBaseClassName(className);
AfDataContainerClassGenerator.generate();
}
}
Also you have to comment to lines of
protected void addCustomCode()
{
// this.addDataContainerTypeMacro();
// this.addNewMethod();
this.addDataItemMethods();
}
Next step is to include this automatic BP error fix to BP check routine.
Mykola
Post by Huzaifa Gain
thanks , but after getting rid of this best practice error i am stuck wuth
"Data object class CustFreeTextInvoice_CustInvoiceLine is missing method
existsAmountDetails." is there any class to remove this error too
Post by Mykola Galak
It is not really good idea to turn off BP verification for AIF. Even if you
are not using AIF now. Probably in the future one will need this
functionality or customer will use BP verification as solution acceptance
criteria.
In case you are 100% sure that you will never use AIF it is better to
include additional rules to SysBPCheckIgnore macro instead of turning off BP
verification.
Mykola
Post by unknown
You can remove the best practice error either by generating these methods
(see Mykola's code for this OR do it from the Tools\Development
Tools\Application Integration Framework\Update document service)
the other option is to turn off this validation, if you are not using Axd
documents and AIF in your installation.
You can do that from the Best Practice Parameters (open them from
Tools\Options\Best Practices).
Simply remove the check-mark from the Application Integration Framework node
or the sub-node (this is actually what triggers this validation). It has a
description of what the check does, by the way
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
Ciprian Ioan
2011-09-20 08:43:40 UTC
Permalink
I have encountered this BP error: data object class
InventItem_InventTable has extra method exists errors for exists and parm methods.
The issue is that the exists and parm extra methods are on SYS layer (I'm working on CUS layer).
Do you have any idea on what's causing this error?
I've checked the field for which the error is thrown and it's still there.
Thank you!
Post by Huzaifa Gain
AX is throwing me this best pratice error , I dont know how to fix it.
The Table.Field does not have a corresponding parm-method on the AxBC-class
Post by Mykola Galak
Hi,
This is caused by new BP rules introduced in 5.0. These parm/exists methods
static void GenerateAxBC(Args _args)
{
axGenerateAxBCClass axGenerateAxBCClass;
;
axGenerateAxBCClass =
AxGenerateAxBCClass::newTableId(tablenum(WMSOrderTrans));
axGenerateAxBCClass.run();
}
Mykola
Post by unknown
You can remove the best practice error either by generating these methods
(see Mykola's code for this OR do it from the Tools\Development
Tools\Application Integration Framework\Update document service)
the other option is to turn off this validation, if you are not using Axd
documents and AIF in your installation.
You can do that from the Best Practice Parameters (open them from
Tools\Options\Best Practices).
Simply remove the check-mark from the Application Integration Framework node
or the sub-node (this is actually what triggers this validation). It has a
description of what the check does, by the way
--
Kashperuk Ivan (Vanya), SDET, Inventory management, Microsoft Dynamics AX
My blog - http://kashperuk.blogspot.com
Download MorphX IT in Russian - http://www.lulu.com/content/723888
Post by Mykola Galak
It is not really good idea to turn off BP verification for AIF. Even if you
are not using AIF now. Probably in the future one will need this
functionality or customer will use BP verification as solution acceptance
criteria.
In case you are 100% sure that you will never use AIF it is better to
include additional rules to SysBPCheckIgnore macro instead of turning off BP
verification.
Mykola
Post by Huzaifa Gain
thanks , but after getting rid of this best practice error i am stuck wuth
"Data object class CustFreeTextInvoice_CustInvoiceLine is missing method
existsAmountDetails." is there any class to remove this error too.
Post by Huzaifa Gain
thanks , but after getting rid of this best practice error i am stuck wuth
"Data object class CustFreeTextInvoice_CustInvoiceLine is missing method
existsAmountDetails." is there any class to remove this error too
Post by Mykola Galak
As Vanya wrote earlier, you can you use Update document service from menu or
static void GenerateParmExist(Args _args)
{
AfDataContainerClassGenerator AfDataContainerClassGenerator = new
AfDataContainerClassGenerator();
Dialog dialog;
DialogField dialogClassName;
AfStronglyTypedDataContainer dataContainer;
AfDataContainerDescriptor dataContainerDescriptor;
SysDictClass dictClass;
str className;
;
dialog = new Dialog("Create parm and exists methods");
dialogClassName = dialog.addField(typeid(ClassName), "Class name");
dialog.run();
if (dialog.closedOk())
{
className = dialogClassName.value();
dictClass = new dictClass(className2Id(className));
dataContainer = dictClass.makeObject();
dataContainerDescriptor = dataContainer.wt().get_Descriptor();
AfDataContainerClassGenerator.parmDataContainerType(dataContainerDescriptor.get_Type());
AfDataContainerClassGenerator.parmDataContainerTypeMacroLibName(dataContainerDescriptor.get_DataSourceName());
AfDataContainerClassGenerator.parmClassName(className);
AfDataContainerClassGenerator.parmBaseClassName(className);
AfDataContainerClassGenerator.generate();
}
}
Also you have to comment to lines of
protected void addCustomCode()
{
// this.addDataContainerTypeMacro();
// this.addNewMethod();
this.addDataItemMethods();
}
Next step is to include this automatic BP error fix to BP check routine.
Mykola
Post by dolpho
I tried this fix and now I am getting data object class
InventItem_InventTable has extra method exists errors for exists and parm
methods. Any suggestions what to do to fix the issue?
Loading...