zoukankan      html  css  js  c++  java
  • How to immediately update planned order upon modified salesline

    Business requirement:

    update planned order upon modification of a salesline without master scheduling.
    Sometimes you want to see changes made on a SalesLine immediately on the reference Planned Order, without Master Scheduling.

    This post describes how you can make a little code adaptation to achieve this. The changed planned order belongs to the dynamic master plan, which seems most logic in these cases.

    Solution:

    X++ code to be added Add following method to the class SalesLineType and call it in the update method of the class SalesLineType.

    static void Jimmy_synchPO(SalesLine _salesLine)
    {
        ReqPO   reqPO;
    ;
        
    //parameters : ReqPlanId _reqPlanId,InventTransRefId _refId,boolean  _forupdate = false)
        reqPO = ReqPO::find(ReqPlanSched::defaultDynamicId(),
                            _salesLine.reqTrans().reqTransSettled(_salesLine.reqTrans().selectCov()).RefId,
                            
    true);

        
    if (reqPO)
        {
            
    // whatever field in reqPO to be updated based on some information on the referenced SalesLine
            reqPO.Qty = _salesLine.SalesQty;
            
    if (reqPO.validateWrite())
                reqPO.update();
        }
    }
  • 相关阅读:
    SystemParametersInfo调用失败的问题
    在wince下如何禁止移动窗体
    【转】WinCE控制面板添加应用程序
    CE6.0 下获得 SD 卡序列号的方法
    SetSystemMemoryDivision 的用法
    两经纬度之间的距离计算
    PC 上访问设备数据库的方法
    通过程序模拟鼠标按下
    车牌号
    比较字母大小
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2126908.html
Copyright © 2011-2022 走看看