简体   繁体   English

如何使用新字段扩展我的 WCF 服务(Dynamics AX 2012)?

[英]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.具体来说,我正在尝试将modifiedBymodifiedDateTime字段添加到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.

相关问题 动态ax部署WCF服务 - dynamics ax deploy WCF service 在验证我的 wcf 服务中的 AX 服务器域、用户名和密码等凭据后,下载 Microsoft Dynamics AX 2012 服务 wsdl 元数据 - Download Microsoft Dynamics AX 2012 service wsdl metadata after validating credentials like AX server domain, user name and password in my wcf service Dynamics AX 2012 R2:使用Web服务WCF启动PO批准工作流 - Dynamics AX 2012 R2: Initiate PO approve workflow using a web service, WCF 如何在不使用VS的情况下从Dynamics AX中的c#项目刷新wcf服务引用 - How to refresh a wcf service reference from c# project in Dynamics AX without VS WCF(Dynamics AX)-服务发送的大多数属性为null - WCF (Dynamics AX) - Service sending most properties null 如何发布WCF服务? - How can I Publish my WCF Service? 为什么无法在Windows Server 2012中浏览到WCF服务? - Why can't I browse to my WCF service in Windows Server 2012? 如何在没有IIS的情况下部署WCF服务? - How can I deploy my WCF Service without IIS? 如何在WCF路由器/负载平衡服务中注册“ PerCall” WCF服务? - How can I register a “PerCall” WCF service with my WCF router/load balancing service? 如何调用我的WCF服务构造函数? - How can I get my WCF Service constructor called?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM