【发布时间】:2016-09-06 19:05:14
【问题描述】:
编辑:问题是,为什么view 上的显示方法不起作用?
我正在尝试使用扩展方法在DirPartyPostalAddressView 上创建显示方法,据我所知,这可能是AX7 错误或者我做错了。我在最新的 AX7 上,最近更新。
我正在使用这里详述的方法https://blogs.msdn.microsoft.com/mfp/2015/12/15/x-in-ax7-extension-methods/
我创建了一个概念证明display method 用于视图DirPartyPostalAddressView 与表CustTable 以显示可能的bug。
扩展类代码:
static class MyClass_extension { public static display NoYesId displayYesDirPartyPostalAddressView (DirPartyPostalAddressView _this) { return NoYes::Yes; } public static display NoYesId displayYesCustTable (CustTable _this) { return NoYes::Yes; } }
我创建了CustTable 形式的扩展,向其添加了一个复选框控件,设置了DataSource = CustTable 和DataMethod = MyClass_extension::displayYesCustTable,这可以正常工作。 (见截图)
问题:我创建了LogisticsPostalAddressGrid 表单的扩展,在网格中添加了一个复选框控件,设置了DataSource = DirPartyPostalAddressView,但它无法编译。 (见截图)
错误是:
The data method 'MyClass_extension::displayYesDirPartyPostalAddressView' was not found on the data source 'DirPartyPostalAddressView' or its base table/view.
【问题讨论】:
-
你的问题是什么?
-
为什么
view上的显示方法不起作用?
标签: axapta x++ dynamics-ax7 d3fo