最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

从X ++创建采购订单时常见的错误 / Common mistake, when creating Purchase Orders from X++

网络文摘 William 1020浏览 0评论
I would like to warn my fellow Axapta/AX/D365FO bloggers, that blind copy-pasting from each other seems innocent, but it fact may result in spreading bugs. E.g., the following piece of code is very popular in "How to create Purchase Order from X++" posts. numberSeq = NumberSeq::newGetNumFromCode(purchParameters::numRefPurchaseOrderId().NumberSequence,true); Purchtable.PurchId = numberSeq.num(); The problem is numRefPurchaseOrderId returns the number sequence for purchase order confirmation number. For purchase order number, numRefPurchId should have been used. Using the wrong number sequence may result in duplicate key issues.
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址