1 . Breakpoint
in clicked method
There is quite well known bug in AX that breakpoint placed in the clicked() method of a button will not be triggered. It is quite unpleasant one since when one faces it first time he gets totally confused. However, there are easy workarounds for this bug. First one – put breakpoint into the method that is called from clicked (in most cases it is possible). But if not, keyword breakpoint can be used – it will be triggered in clicked() method.
There is quite well known bug in AX that breakpoint placed in the clicked() method of a button will not be triggered. It is quite unpleasant one since when one faces it first time he gets totally confused. However, there are easy workarounds for this bug. First one – put breakpoint into the method that is called from clicked (in most cases it is possible). But if not, keyword breakpoint can be used – it will be triggered in clicked() method.
2. Global::isType
The easiest way to determine if an EDT extends
another EDT (not necessarily directly) is to use Global::isType() method.
For example:
For example:
isType(extendedtypenum(PurchUnit),
extendedtypenum(UnitIDBase));
give true, since PurchUnit extends UnitID, which extends UnitIDBase.
give true, since PurchUnit extends UnitID, which extends UnitIDBase.
isType(extendedtypenum(ABCModelType),
extendedtypenum(NoYesId));
gives false, since ABCModelType and NoYesId are in different hierarchies.
gives false, since ABCModelType and NoYesId are in different hierarchies.
3. Delete
actions and multiple relations
If
one table has several relations to another table delete action will not work
properly. In such case delete action will be triggered for only one of the
relations. So, in the case of multiple relations one should write his own
cascading or restricting logic in the delete method. An example can be found in
Unit and UnitConvert tables. UnitConvert table has two relations to the Unit
table – from unit and to unit. Table Unit has cascading delete action for the
UnitConvert table. However, if a unit will be deleted, only unit conversions
with from unit equal to the deleted one will be deleted. Conversions with to
unit equal to the deleted one will survive. Example of correct implementation
can be found in InventTestEmplResponsible and EmplTable. EmplTable has delete
method overridden to perform manual delete in the InventTestEmplResponsible
table.
No comments:
Post a Comment