zoukankan      html  css  js  c++  java
  • display method in Dynamics 365 FO

    This posts helps you to understand and create a "display"  method for the table extension.

    Lets say, the requirement is to add a method in the standard table, it can be achieved either by creating a table extension.

    So in this scenario we had a requirement to add a display method in the standard table "CustTrans".

    In Dynamics 365 we wont be able to add the new method or modify the existing method to the standard table or to an extension table.

    It can be achieved by using the extension class.

    Step 1: Create a new class and name it as <Classname>_<Extension>.

    <Class-name> - can be any name, but it is preferred to give the table name for which the extension is being created. 

    postfix <_Extension> is must.

    public static class CustTrans_Extension

    {

    }

    Step 2 : Now add the display methods in the class which is required to be shown.

    public static class CustTrans_Extension

    {

    [SysClientCacheDataMethodAttribute(true)]

    public static display AgreementId agreementId(CustTrans _this)

    {

    LedgerJournalTrans ledgerJournalTrans;

    select ledgerJournalTrans
    where ledgerJournalTrans.TransactionType == LedgerTransType::Payment &&
    LedgerJournalTrans.CustTransId == _this.RecId;


    return ledgerJournalTrans.AgreementId;

    }

    }

    Step 3: To use this display method in the form.

    Create a string control in the form design and set the following properties

    Data source: CustTrans

    DataMethod: CustTrans_Extension::agreementId

    CacheDataMethod: Yes

    Below is the screen shot for reference.

    Step 4: Build/Rebuild the project/solution and check the output in the URL.

  • 相关阅读:
    排序去重
    $(...)[0].attr is not a function问题
    daterangepicker的汉化和简单使用
    wx.openSetting的调整
    css3中-moz、-ms、-webkit与盒子模型
    动态翻滚的导航条
    CSS3 transition 浏览器兼容性
    jq实现两个input输入同时不为空时,改变确认框背景颜色
    js 监听input 实现数据绑定
    关于html 修改滚动条的问题
  • 原文地址:https://www.cnblogs.com/lingdanglfw/p/15546059.html
Copyright © 2011-2022 走看看