zoukankan      html  css  js  c++  java
  • AX 2012 Post a partial product receipt for a purchase order

    Problem:Post a partial product receipt for a purchase order

    Solution: We need to post partial product receipt for a purchase order. The lines to post are determined by the line number range You can add range on any field in purch line. The receive now quantity will specify the quantity to receive against each line.

    purchTable = PurchTable::find(“PO1002228”);
    update_recordSet  purchLine
    setting purchReceivedNow = 1 , Inventreceivednow = 1
    where purchLine.PurchId == purchTable.PurchId &&
    purchLine.LineNumber == 1;

    query = new Query(queryStr(PurchUpdate));//Query for the filter criteria
    query.dataSourceTable(tableNum(PurchTable)).addRange(fieldnum   (PurchTable,PurchId)).value(queryValue(purchTable.PurchId));
    query.dataSourceTable(tableNum(PurchLine)).addRange(fieldNum(PurchLine,LineNumber)).value(queryValue(1));
    chooseLinesQuery = new SysQueryRun(query);
    purchFormLetter = PurchFormLetter_PackingSlip::newPackingSlipFromChooseLineQuery(chooseLinesQuery,purchTable); //pass in _purchid,
    purchFormLetter.update( purchTable,
    “PA0093”,//product receipt number
    systemDateGet(),//trans date
    PurchUpdate::ReceiveNow,//Receive now
    AccountOrder::None,
    false,
    false);

  • 相关阅读:
    多线程之异步操作
    AppDomain
    多线程之线程同步
    webServices与Web服务
    webParts与Web部件
    xhtmlConformance与xhtml脚本呈现
    webControls与客户端脚本路径
    urlMappings与URL映射
    trace与代码跟踪服务
    siteMap与站点导航
  • 原文地址:https://www.cnblogs.com/fogfog/p/6137153.html
Copyright © 2011-2022 走看看