[英]How can I extend my WCF Service with new fields (Dynamics AX 2012)?
I'm trying to extend the HcmWorkerImportService
;我正在尝试扩展HcmWorkerImportService
; specifically I'm trying to add the modifiedBy
and modifiedDateTime
fields to the HcmPositionHierarchy
table/class.具体来说,我正在尝试将modifiedBy
和modifiedDateTime
字段添加到HcmPositionHierarchy
表/类。
It is however not showing up when I update the service in my C#/WPF application.但是,当我在 C#/WPF 应用程序中更新服务时,它没有显示。 Google so far only turned up links that aren't applicable to this type of service (which is backed by classes).到目前为止,Google 只打开了不适用于此类服务(由类支持)的链接。
Other classes that have been modified to include these fields have the following methods (which I copied to HcmWorkerImport_HcmPositionHierarchy
but without success):已修改为包含这些字段的其他类具有以下方法(我将其复制到HcmWorkerImport_HcmPositionHierarchy
但没有成功):
#define.ModifiedDateTime('ModifiedDateTime')
#define.ModifiedBy('ModifiedBy')
public boolean existsModifiedBy()
{
return this.exists(#ModifiedBy);
}
public boolean existsModifiedDateTime()
{
return this.exists(#ModifiedDateTime);
}
public ModifiedBy parmModifiedBy(ModifiedBy _value = '')
{
if (!prmisdefault(_value))
{
this.set_Attribute(#ModifiedBy, _value);
}
return this.get_Attribute(#ModifiedBy);
}
public ModifiedDateTime parmModifiedDateTime(ModifiedDateTime _value = utcDateTimeNull())
{
if (!prmisdefault(_value))
{
this.set_Attribute(#ModifiedDateTime, _value);
}
return this.get_Attribute(#ModifiedDateTime);
}
There does seem to be a query attached to the service and some search results suggest that I need to include the fields there as well.似乎有一个查询附加到该服务,并且一些搜索结果表明我还需要在那里包含这些字段。 They have however already been included previously.然而,它们之前已经被包括在内。
You need to manually create parm methods for ModifiedDateTime and ModifiedBy fields in AxBC class AxHcmPositionHierarchy.您需要为 AxBC 类 AxHcmPositionHierarchy 中的 ModifiedDateTime 和 ModifiedBy 字段手动创建 parm 方法。 Please check the following link for example: http://axgrind.azurewebsites.net/2015/12/Adding-system-fields-to-AIF-Services/例如,请检查以下链接: http : //axgrind.azurewebsites.net/2015/12/Adding-system-fields-to-AIF-Services/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.