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.
从X ++创建采购订单时常见的错误 / Common mistake, when creating Purchase Orders from X++
与本文相关的文章
- D365FO: Bypassing “next” in CoC
- 通过X ++进行标记 / Marking via X++
- 控制网格线颜色 / Controlling grid line colors
- 从主科目和财务维度创建LedgerDimension / Create LedgerDimension from main account and financial dimensions
- Bugs in the DateTimeUtil::getSystemDateTime()
- Deleting a customer with no transaction generates error message, and customer can not be deleted