繁体   English   中英

通用docCursor()-AX 2012

[英]Common docCursor() - ax 2012

我将一些解决方案和项目从ax 2009移到了2012,发现了这种方法:

public Common docCursor()    
{
    Common docCursor;
    docCursor = super();
    if (docCursor.TableId == tablenum(InventDim))
    {
        docCursor = custPackingSlipTrans;
    }
    return docCursor;
}

我正在阅读有关common的文章,但我真的不明白该方法的作用。 有人能帮我吗?

Common是Axapta中所有表的祖先。 在这种方法中:

我们使用当前类的前辈来获取表变量:

    docCursor = super();

我们不知道它在哪张桌子上。 因此,我们检查它是否是InventDim表的实例:

    if (docCursor.TableId == tablenum(InventDim))

如果是的话,我们用'custPackingSlipTrans'变量覆盖此表变量。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM