Add SCM functional knowledge domain (#192)

* Add SCM functional knowledge domain

Introduce nine source-backed rules with original AL sample pairs, bounded SCM review routing, and complete positive/clean evaluation coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Normalize SCM knowledge and review ownership

Align article and AL sample conventions, keep BC facts separate from review mechanics, and clarify reciprocal Finance ownership without bespoke shared test assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jesper Schulz-Wedde 2026-09-21 10:16:44 +02:00 • committed by GitHub
parent d38377b85e
commit bec8890b7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 1030 additions and 10 deletions

View file

@ -0,0 +1,31 @@
codeunit 50117 "SCM Requisition Action Good"
{
procedure CarryOutAcceptedNewPurchase(TemplateName: Code[10]; BatchName: Code[10]; LineNo: Integer; OrderDate: Date; PostingDate: Date; ReceiptDate: Date; CutoffDate: Date)
var
RequisitionLine: Record "Requisition Line";
PurchaseHeaderDefaults: Record "Purchase Header";
ReqWkshMakeOrder: Codeunit "Req. Wksh.-Make Order";
begin
if (OrderDate = 0D) or (PostingDate = 0D) or (ReceiptDate = 0D) or (CutoffDate = 0D) then
Error(PlanningDatesErr);
RequisitionLine.Get(TemplateName, BatchName, LineNo);
RequisitionLine.TestField(Type, RequisitionLine.Type::Item);
RequisitionLine.TestField("Replenishment System", RequisitionLine."Replenishment System"::Purchase);
RequisitionLine.TestField("Action Message", RequisitionLine."Action Message"::New);
RequisitionLine.TestField("Accept Action Message", true);
RequisitionLine.TestField("Demand Type", Database::"Sales Line");
RequisitionLine.TestField("Demand Order No.");
RequisitionLine.TestField("Vendor No.");
RequisitionLine.SetRecFilter();
PurchaseHeaderDefaults."Order Date" := OrderDate;
PurchaseHeaderDefaults."Posting Date" := PostingDate;
PurchaseHeaderDefaults."Expected Receipt Date" := ReceiptDate;
ReqWkshMakeOrder.Set(PurchaseHeaderDefaults, CutoffDate, false);
ReqWkshMakeOrder.SetSuppressCommit(true);
ReqWkshMakeOrder.CarryOutBatchAction(RequisitionLine);
end;
var
PlanningDatesErr: Label 'Supply explicit order, posting, receipt, and cutoff dates.';
}