AX 2012 Post a partial product receipt for a purchase order

Posted on May 9, 2015by srinathsundaresan

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);

时间: 2024-10-06 11:56:33

AX 2012 Post a partial product receipt for a purchase order的相关文章

Customizing AX 2012 Released Product ListPage Filter using X++

In Microsoft Dynamics AX 2012, ListPages are more restricted from customization than in prior versions of AX.  Primary reason for the restriction is so that the list pages maintain compatibility with Enterprise Portal.  Recently a customer had a requ

Understanding the RelationshipType Enumeration [AX 2012]

Understanding the RelationshipType Enumeration [AX 2012] 3 out of 3 rated this helpful - Rate this topic Updated: January 28, 2012 Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012 When you

Select Statement Syntax [AX 2012]

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012 SelectStatement = select Parameters Parameters   [ [  FindOptions  ] [  FieldList  from ] ] TableBufferVaria

Dynamics AX 2012 – Batch Jobs Not Executing

In Dynamics AX 2012, there are times when batch jobs appear to be stranded in a waiting status.  When this happens, the cause can typically be a batch server or batch group which is not set up properly.   However, if these are set up correctly and yo

How to: Debug X++ Code Running in .NET Business Connector [AX 2012]

This topic has not yet been rated - Rate this topic http://msdn.microsoft.com/EN-US/library/bb190066.aspx Updated: December 16, 2011 Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Mi

Using Controls in a Form Design [AX 2012]

Using Controls in a Form Design [AX 2012] This topic has not yet been rated - Rate this topic Updated: January 27, 2012 Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynam

AX 2012 model应用

说句实话,AX2012 model真心不好用,当你开发好,把Model到入到客户环境时, 要防止有冲突,假如出现冲突的话,还必须去删除另外一个Model里面冲突的代码,真心麻烦. 下面给一个ax 导入的例子: 这个就是导入mode的例子,下面还有各种命令: 假如你想要上网搜索关于model命令时,可以直接百度或者谷歌搜索  ax uninstall model/ax  install model等等 AX 2012 model应用,码迷,mamicode.com

Failed to upgrade AX 2012 R3 Retail channel database from CU9 to CU11 if SQL Server version was lower than 2012

I tried to upgrade AX 2012 R3 Retail channel database from CU9 to CU11 for client. after generated new CreateDatabase.dll with upgraded Retail SDK, ran the Channel Configuration Utility, but got error. So I tried the sql queries from CreateDatabase p

Overview of Form Control Types [AX 2012]

Overview of Form Control Types [AX 2012] Other Versions 0 out of 1 rated this helpful - Rate this topic Updated: October 11, 2011 Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Micro