From 15b3690f54904bb793ecd982b238c6103e4e5de2 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 21 Jul 2026 16:27:03 +0530 Subject: [PATCH 01/17] Initial Commit --- .../Utilities/CopyDocumentMgt.Codeunit.al | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index a74096314f5..889c672bbae 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,6 +265,11 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; @@ -438,6 +443,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -591,6 +599,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -832,6 +843,11 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -1965,6 +1981,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -2951,6 +2970,11 @@ codeunit 6620 "Copy Document Mgt." + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5703,6 +5727,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; @@ -5759,6 +5786,9 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5771,6 +5801,11 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5783,6 +5818,8 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5799,6 +5836,8 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; From 542713ae70b1237a9b174c1997788e543be21218 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 21 Jul 2026 16:28:57 +0530 Subject: [PATCH 02/17] Invoke-Miapp --- .../Utilities/CopyDocumentMgt.Codeunit.al | 39 +++++++++++++++++++ .../Utilities/CopyDocumentMgt.Codeunit.al | 39 +++++++++++++++++++ .../Utilities/CopyDocumentMgt.Codeunit.al | 39 +++++++++++++++++++ .../Utilities/CopyDocumentMgt.Codeunit.al | 39 +++++++++++++++++++ .../Utilities/CopyDocumentMgt.Codeunit.al | 39 +++++++++++++++++++ 5 files changed, 195 insertions(+) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 142fb1cc037..8fdb63b7ab1 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -269,6 +269,11 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; @@ -442,6 +447,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -595,6 +603,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -836,6 +847,11 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -1972,6 +1988,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -2961,6 +2980,11 @@ codeunit 6620 "Copy Document Mgt." + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5713,6 +5737,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; @@ -5769,6 +5796,9 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5781,6 +5811,11 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5793,6 +5828,8 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5809,6 +5846,8 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 49168407a38..85d176e6978 100644 --- a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,6 +265,11 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; @@ -438,6 +443,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -591,6 +599,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -834,6 +845,11 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -1978,6 +1994,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -2965,6 +2984,11 @@ codeunit 6620 "Copy Document Mgt." + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5717,6 +5741,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; @@ -5773,6 +5800,9 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5785,6 +5815,11 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5797,6 +5832,8 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5813,6 +5850,8 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index c1030a8b7d5..38b25c43c76 100644 --- a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -267,6 +267,11 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; @@ -449,6 +454,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -603,6 +611,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -844,6 +855,11 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -1987,6 +2003,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -2973,6 +2992,11 @@ codeunit 6620 "Copy Document Mgt." + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5729,6 +5753,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; @@ -5785,6 +5812,9 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5797,6 +5827,11 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5809,6 +5844,8 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5825,6 +5862,8 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 7b0f52588eb..1b4fcc3b586 100644 --- a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,6 +265,11 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; @@ -438,6 +443,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -591,6 +599,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -832,6 +843,11 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -1965,6 +1981,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -2951,6 +2970,11 @@ codeunit 6620 "Copy Document Mgt." + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5703,6 +5727,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; @@ -5759,6 +5786,9 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5771,6 +5801,11 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5783,6 +5818,8 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5799,6 +5836,8 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 28db6ba8219..59530707460 100644 --- a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,6 +265,11 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; @@ -440,6 +445,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -593,6 +601,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -834,6 +845,11 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -1968,6 +1984,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -2959,6 +2978,11 @@ codeunit 6620 "Copy Document Mgt." + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5720,6 +5744,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; @@ -5776,6 +5803,9 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5788,6 +5818,11 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5800,6 +5835,8 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5816,6 +5853,8 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; From e48e0c0948e6a61fea7c543539844a34789f97b8 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Thu, 23 Jul 2026 22:54:55 +0530 Subject: [PATCH 03/17] Chnage --- src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 889c672bbae..c8d9c8b8ba9 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,11 +265,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; From 9cf6b3aa7d488927d21a10e05adfbd2191f00b4e Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Thu, 23 Jul 2026 23:13:10 +0530 Subject: [PATCH 04/17] Miapp --- src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 5 ----- src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 5 ----- src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 5 ----- src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 5 ----- src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 5 ----- src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 1 + 6 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 8fdb63b7ab1..14383668b75 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -269,11 +269,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; diff --git a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 85d176e6978..c3646943ca9 100644 --- a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,11 +265,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; diff --git a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 38b25c43c76..5f79294dda5 100644 --- a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -267,11 +267,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; diff --git a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 1b4fcc3b586..c842e12a5c3 100644 --- a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,11 +265,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; diff --git a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 59530707460..a72332aa196 100644 --- a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -265,11 +265,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterCopySalesDocForCrMemoCancelling(FromDocNo, ToSalesHeader, IncludeHeader, RecalculateLines, MoveNegLines, CreateToHeader, HideDialog, ExactCostRevMandatory, ApplyFully, SkipTestCreditLimit, SkipCopyFromDescription); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesDoc(FromDocType: Enum "Sales Document Type From"; FromDocNo: Code[20]; var ToSalesHeader: Record "Sales Header") var ToSalesLine: Record "Sales Line"; diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index c8d9c8b8ba9..6639a6cc54e 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -438,6 +438,7 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] From 88d0490330cafa44595c45d7ddf3178a50a6f6b7 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Fri, 31 Jul 2026 15:10:15 +0530 Subject: [PATCH 05/17] update fix --- .../Utilities/CopyDocumentMgt.Codeunit.al | 22 ------------------- .../Utilities/CopyDocumentMgt.Codeunit.al | 22 ------------------- .../Utilities/CopyDocumentMgt.Codeunit.al | 22 ------------------- .../Utilities/CopyDocumentMgt.Codeunit.al | 22 ------------------- .../Utilities/CopyDocumentMgt.Codeunit.al | 22 ------------------- .../Utilities/CopyDocumentMgt.Codeunit.al | 22 ------------------- 6 files changed, 132 deletions(-) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 14383668b75..b965233547a 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -842,11 +842,6 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -2975,11 +2970,6 @@ codeunit 6620 "Copy Document Mgt." - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5791,9 +5781,6 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5806,11 +5793,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5823,8 +5805,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5841,8 +5821,6 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index c3646943ca9..b50cf5a6ca7 100644 --- a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -840,11 +840,6 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -2979,11 +2974,6 @@ codeunit 6620 "Copy Document Mgt." - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5795,9 +5785,6 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5810,11 +5797,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5827,8 +5809,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5845,8 +5825,6 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 5f79294dda5..f3b67fa051d 100644 --- a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -850,11 +850,6 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -2987,11 +2982,6 @@ codeunit 6620 "Copy Document Mgt." - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5807,9 +5797,6 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5822,11 +5809,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5839,8 +5821,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5857,8 +5837,6 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index c842e12a5c3..74752c9c243 100644 --- a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -838,11 +838,6 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -2965,11 +2960,6 @@ codeunit 6620 "Copy Document Mgt." - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5781,9 +5771,6 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5796,11 +5783,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5813,8 +5795,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5831,8 +5811,6 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index a72332aa196..0f55a5b6b95 100644 --- a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -840,11 +840,6 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -2973,11 +2968,6 @@ codeunit 6620 "Copy Document Mgt." - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5798,9 +5788,6 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5813,11 +5800,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5830,8 +5812,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5848,8 +5828,6 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 6639a6cc54e..55ae0b3c8ff 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -839,11 +839,6 @@ codeunit 6620 "Copy Document Mgt." Cust.CheckBlockedCustOnDocs(Cust, ToSalesHeader."Document Type", false, false); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure CheckAsmHdrExistsForFromDocLine(ToSalesHeader: Record "Sales Header"; FromSalesLine2: Record "Sales Line"; var BufferCount: Integer; LineCountsEqual: Boolean) begin BufferCount += 1; @@ -2966,11 +2961,6 @@ codeunit 6620 "Copy Document Mgt." - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopySalesShptLinesToDoc(ToSalesHeader: Record "Sales Header"; var FromSalesShptLine: Record "Sales Shipment Line"; var LinesNotCopied: Integer; var MissingExCostRevLink: Boolean) var ItemLedgEntry: Record "Item Ledger Entry"; @@ -5782,9 +5772,6 @@ codeunit 6620 "Copy Document Mgt." ToAsmHeader.ShowDueDateBeforeWorkDateMsg(); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] procedure CopyAsmHeaderToAsmHeader(FromAsmHeader: Record "Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5797,11 +5784,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] procedure CopyPostedAsmHeaderToAsmHeader(PostedAsmHeader: Record "Posted Assembly Header"; ToAsmHeader: Record "Assembly Header"; IncludeHeader: Boolean) var EmptyToSalesLine: Record "Sales Line"; @@ -5814,8 +5796,6 @@ codeunit 6620 "Copy Document Mgt." TempAsmHeader, TempAsmLine, EmptyToSalesLine, ToAsmHeader."Document Type".AsInteger(), ToAsmHeader."No.", IncludeHeader); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromNonPosted(AsmHeader: Record "Assembly Header") var AsmLine: Record "Assembly Line"; @@ -5832,8 +5812,6 @@ codeunit 6620 "Copy Document Mgt." until AsmLine.Next() = 0; end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Posted Assembly Line", 'R', InherentPermissionsScope::Both)] local procedure GenerateAsmDataFromPosted(PostedAssemblyHeader: Record "Posted Assembly Header"; DocType: Enum "Assembly Document Type") var PostedAsmLine: Record "Posted Assembly Line"; From e1c7dcc813d32a0af55c80ab9780eec5419ad491 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Thu, 6 Aug 2026 16:28:59 +0530 Subject: [PATCH 06/17] update Permission --- .../Utilities/CopyDocumentMgt.Codeunit.al | 24 +++++++++---------- .../Utilities/CopyDocumentMgt.Codeunit.al | 24 +++++++++---------- .../Utilities/CopyDocumentMgt.Codeunit.al | 24 +++++++++---------- .../Utilities/CopyDocumentMgt.Codeunit.al | 24 +++++++++---------- .../Utilities/CopyDocumentMgt.Codeunit.al | 24 +++++++++---------- .../Utilities/CopyDocumentMgt.Codeunit.al | 24 +++++++++---------- 6 files changed, 72 insertions(+), 72 deletions(-) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index b965233547a..3b390f02ba9 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -442,9 +442,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -598,9 +598,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -1978,9 +1978,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5722,9 +5722,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index b50cf5a6ca7..a6a2edaf062 100644 --- a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -438,9 +438,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -594,9 +594,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -1984,9 +1984,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5726,9 +5726,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index f3b67fa051d..b58dfbd40d1 100644 --- a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -449,9 +449,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -606,9 +606,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -1993,9 +1993,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5738,9 +5738,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 74752c9c243..b6403067ac4 100644 --- a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -438,9 +438,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -594,9 +594,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -1971,9 +1971,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5712,9 +5712,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 0f55a5b6b95..41b2d1c1554 100644 --- a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -440,9 +440,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -596,9 +596,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -1974,9 +1974,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5729,9 +5729,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 55ae0b3c8ff..4a58be6222f 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -439,9 +439,9 @@ codeunit 6620 "Copy Document Mgt." end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -595,9 +595,9 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -1972,9 +1972,9 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5713,9 +5713,9 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIMD', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIMD', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; From ed20ea11d1740b7cfbbdc8964462e13b35dea351 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Mon, 10 Aug 2026 17:27:19 +0530 Subject: [PATCH 07/17] Automation Added --- .../Tests/SCM/SCMCopyDocumentMgt.Codeunit.al | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al index b071ed726db..b55e7dd6e04 100644 --- a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al @@ -1726,6 +1726,68 @@ codeunit 137212 "SCM Copy Document Mgt." ReturnSalesLine.TestField(Quantity, TotalQty); end; + [Test] + [HandlerFunctions('MessageHandler')] + [Scope('OnPrem')] + procedure CopySalesQuoteWithATOAsTeamMember() + var + Item: Record Item; + AssemblyItem: Record Item; + FromSalesHeader: Record "Sales Header"; + FromSalesLine: Record "Sales Line"; + ToSalesHeader: Record "Sales Header"; + ToSalesLine: Record "Sales Line"; + AssemblyHeader: Record "Assembly Header"; + LibraryLowerPermissions: Codeunit "Library - Lower Permissions"; + Qty: Decimal; + begin + // [FEATURE] [Assemble-to-Order] [Copy Document] [Permissions] + // [SCENARIO] AB#630947: A user restricted to the D365 Team Member permission set can copy a sales quote whose + // line has an assemble-to-order link, and the copy reproduces the ATO link on the target line. + Initialize(); + + // [GIVEN] Assemble-to-order item with an assembly component + LibraryInventory.CreateItem(Item); + Item.Validate("Replenishment System", Item."Replenishment System"::Assembly); + Item.Validate("Assembly Policy", Item."Assembly Policy"::"Assemble-to-Order"); + Item.Modify(true); + LibraryAssembly.CreateAssemblyList( + AssemblyItem."Costing Method"::Standard, Item."No.", true, 1, 0, 0, LibraryRandom.RandInt(5), '', ''); + + // [GIVEN] Source sales quote with the ATO item; validating the item auto-creates the ATO link + Qty := LibraryRandom.RandIntInRange(2, 10); + LibrarySales.CreateSalesDocumentWithItem( + FromSalesHeader, FromSalesLine, FromSalesHeader."Document Type"::Quote, LibrarySales.CreateCustomerNo(), + Item."No.", Qty, '', WorkDate()); + + // [GIVEN] Empty target sales quote created while the user still has full permissions + CreateEmptySalesHeader(ToSalesHeader, ToSalesHeader."Document Type"::Quote); + Commit(); + + // [GIVEN] User is now restricted to the D365 Team Member permission set (regression harness for AB#630947) + LibraryLowerPermissions.SetTeamMember(); + + // [WHEN] Copy Document is executed for the source quote into the target quote + CopyDocumentMgt.SetProperties(true, false, false, false, true, false, false); + CopyDocumentMgt.CopySalesDoc("Sales Document Type From"::Quote, FromSalesHeader."No.", ToSalesHeader); + + // [THEN] The copied line exists on the target quote with the same quantity and Qty. to Assemble to Order... + LibraryLowerPermissions.SetO365Full(); + ToSalesLine.SetRange("Document Type", ToSalesHeader."Document Type"); + ToSalesLine.SetRange("Document No.", ToSalesHeader."No."); + ToSalesLine.SetRange(Type, ToSalesLine.Type::Item); + ToSalesLine.SetRange("No.", Item."No."); + Assert.RecordCount(ToSalesLine, 1); + ToSalesLine.FindFirst(); + ToSalesLine.TestField(Quantity, Qty); + ToSalesLine.TestField("Qty. to Assemble to Order", Qty); + + // [THEN] ...and an Assembly Header is linked to the copied sales line + Assert.IsTrue( + ToSalesLine.AsmToOrderExists(AssemblyHeader), + 'Assemble-to-Order link should exist for the copied sales line.'); + end; + local procedure Initialize() var LibraryERMCountryData: Codeunit "Library - ERM Country Data"; From 022c672e739b85fb61ecb78e225b731b2a615e68 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 11 Aug 2026 09:16:01 +0530 Subject: [PATCH 08/17] update --- src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al index b55e7dd6e04..f71d0daaec3 100644 --- a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al @@ -1746,13 +1746,14 @@ codeunit 137212 "SCM Copy Document Mgt." // line has an assemble-to-order link, and the copy reproduces the ATO link on the target line. Initialize(); - // [GIVEN] Assemble-to-order item with an assembly component + // [GIVEN] Assemble-to-order item with a resource component (resource-only BOM avoids the + // component availability engine that would read Prod. Order tables outside the fix under test) LibraryInventory.CreateItem(Item); Item.Validate("Replenishment System", Item."Replenishment System"::Assembly); Item.Validate("Assembly Policy", Item."Assembly Policy"::"Assemble-to-Order"); Item.Modify(true); LibraryAssembly.CreateAssemblyList( - AssemblyItem."Costing Method"::Standard, Item."No.", true, 1, 0, 0, LibraryRandom.RandInt(5), '', ''); + AssemblyItem."Costing Method"::Standard, Item."No.", true, 0, 1, 0, LibraryRandom.RandInt(5), '', ''); // [GIVEN] Source sales quote with the ATO item; validating the item auto-creates the ATO link Qty := LibraryRandom.RandIntInRange(2, 10); From 618d64c834d7cfff4107819a783c5eeb521fecd2 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Thu, 13 Aug 2026 17:38:41 +0530 Subject: [PATCH 09/17] fix test --- src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al index f71d0daaec3..8de07805bbe 100644 --- a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al @@ -27,6 +27,7 @@ codeunit 137212 "SCM Copy Document Mgt." LibrarySetupStorage: Codeunit "Library - Setup Storage"; LibraryRandom: Codeunit "Library - Random"; LibraryWarehouse: Codeunit "Library - Warehouse"; + LibraryE2EPlanPermissions: Codeunit "Library - E2E Plan Permissions"; IsInitialized: Boolean; MsgCorrectedInvoiceNo: Label 'have a Corrected Invoice No. Do you want to continue?'; WrongDimensionsCopiedErr: Label 'Wrong dimensions in copied document'; @@ -1765,8 +1766,8 @@ codeunit 137212 "SCM Copy Document Mgt." CreateEmptySalesHeader(ToSalesHeader, ToSalesHeader."Document Type"::Quote); Commit(); - // [GIVEN] User is now restricted to the D365 Team Member permission set (regression harness for AB#630947) - LibraryLowerPermissions.SetTeamMember(); + // [GIVEN] User is now restricted to the D365 Team Member plan (regression harness for AB#630947) + LibraryE2EPlanPermissions.SetTeamMemberPlan(); // [WHEN] Copy Document is executed for the source quote into the target quote CopyDocumentMgt.SetProperties(true, false, false, false, true, false, false); From 3336b914aafbcc9381fbadbf9c2315e94417fc3b Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 18 Aug 2026 18:58:03 +0530 Subject: [PATCH 10/17] update --- src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 4a58be6222f..0edfd42dd5d 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -439,9 +439,9 @@ codeunit 6620 "Copy Document Mgt." end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; From 8c85700eed445f48ea89661f26e13292ba267fa1 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 18 Aug 2026 19:01:53 +0530 Subject: [PATCH 11/17] update --- src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 6 +++--- src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 6 +++--- src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 6 +++--- src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 6 +++--- src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 150488c9b73..9c36348df9f 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -442,9 +442,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; diff --git a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index ee6a4e382b3..e820f661506 100644 --- a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -438,9 +438,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; diff --git a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 47db2f5cf66..4f0b73d74f4 100644 --- a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -449,9 +449,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; diff --git a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index ce77cf29316..2da5cbe7f21 100644 --- a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -438,9 +438,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; diff --git a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index b7c5b4e6aff..bac1b81983d 100644 --- a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -440,9 +440,9 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; From 126a6a9e2f4203c6811c5309f334355eb7f196c7 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Thu, 27 Aug 2026 09:57:38 +0530 Subject: [PATCH 12/17] update --- .../Tests/SCM/SCMCopyDocumentMgt.Codeunit.al | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al index 8de07805bbe..df3c6ad102c 100644 --- a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al @@ -1790,6 +1790,76 @@ codeunit 137212 "SCM Copy Document Mgt." 'Assemble-to-Order link should exist for the copied sales line.'); end; + [Test] + [HandlerFunctions('MessageHandler')] + [Scope('OnPrem')] + procedure CopySalesQuoteWithItemComponentATOAsTeamMember() + var + Item: Record Item; + AssemblyItem: Record Item; + FromSalesHeader: Record "Sales Header"; + FromSalesLine: Record "Sales Line"; + ToSalesHeader: Record "Sales Header"; + ToSalesLine: Record "Sales Line"; + AssemblyHeader: Record "Assembly Header"; + AssemblyLine: Record "Assembly Line"; + LibraryLowerPermissions: Codeunit "Library - Lower Permissions"; + Qty: Decimal; + begin + // [FEATURE] [Assemble-to-Order] [Copy Document] [Permissions] + // [SCENARIO] AB#630947: A user restricted to the D365 Team Member permission set can copy a sales quote whose + // line has an assemble-to-order link built from an item component, and the copy reproduces the ATO link and + // the item assembly line on the target line. + Initialize(); + + // [GIVEN] Assemble-to-order item with a single item component (typical ATO BOM that reads item data) + LibraryInventory.CreateItem(Item); + Item.Validate("Replenishment System", Item."Replenishment System"::Assembly); + Item.Validate("Assembly Policy", Item."Assembly Policy"::"Assemble-to-Order"); + Item.Modify(true); + LibraryAssembly.CreateAssemblyList( + AssemblyItem."Costing Method"::Standard, Item."No.", true, 1, 0, 0, LibraryRandom.RandInt(5), '', ''); + + // [GIVEN] Source sales quote with the ATO item; validating the item auto-creates the ATO link + Qty := LibraryRandom.RandIntInRange(2, 10); + LibrarySales.CreateSalesDocumentWithItem( + FromSalesHeader, FromSalesLine, FromSalesHeader."Document Type"::Quote, LibrarySales.CreateCustomerNo(), + Item."No.", Qty, '', WorkDate()); + + // [GIVEN] Empty target sales quote created while the user still has full permissions + CreateEmptySalesHeader(ToSalesHeader, ToSalesHeader."Document Type"::Quote); + Commit(); + + // [GIVEN] User is now restricted to the D365 Team Member plan (regression harness for AB#630947) + LibraryE2EPlanPermissions.SetTeamMemberPlan(); + + // [WHEN] Copy Document is executed for the source quote into the target quote + CopyDocumentMgt.SetProperties(true, false, false, false, true, false, false); + CopyDocumentMgt.CopySalesDoc("Sales Document Type From"::Quote, FromSalesHeader."No.", ToSalesHeader); + + // [THEN] The copied line exists on the target quote with the same quantity and Qty. to Assemble to Order... + LibraryLowerPermissions.SetO365Full(); + ToSalesLine.SetRange("Document Type", ToSalesHeader."Document Type"); + ToSalesLine.SetRange("Document No.", ToSalesHeader."No."); + ToSalesLine.SetRange(Type, ToSalesLine.Type::Item); + ToSalesLine.SetRange("No.", Item."No."); + Assert.RecordCount(ToSalesLine, 1); + ToSalesLine.FindFirst(); + ToSalesLine.TestField(Quantity, Qty); + ToSalesLine.TestField("Qty. to Assemble to Order", Qty); + + // [THEN] ...an Assembly Header is linked to the copied sales line... + Assert.IsTrue( + ToSalesLine.AsmToOrderExists(AssemblyHeader), + 'Assemble-to-Order link should exist for the copied sales line.'); + + // [THEN] ...and the linked assembly order reproduces the item component line + AssemblyLine.SetRange("Document Type", AssemblyHeader."Document Type"); + AssemblyLine.SetRange("Document No.", AssemblyHeader."No."); + AssemblyLine.SetRange(Type, AssemblyLine.Type::Item); + Assert.RecordCount(AssemblyLine, 1); + end; + local procedure Initialize() var LibraryERMCountryData: Codeunit "Library - ERM Country Data"; From 70a20c25e08fd73e2468253ba74471e2d5f920f1 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Mon, 31 Aug 2026 20:10:04 +0530 Subject: [PATCH 13/17] update --- .../Utilities/CopyDocumentMgt.Codeunit.al | 5 +- .../Utilities/CopyDocumentMgt.Codeunit.al | 5 +- .../Utilities/CopyDocumentMgt.Codeunit.al | 5 +- .../Utilities/CopyDocumentMgt.Codeunit.al | 5 +- .../Utilities/CopyDocumentMgt.Codeunit.al | 5 +- .../Utilities/CopyDocumentMgt.Codeunit.al | 5 +- .../Tests/SCM/SCMCopyDocumentMgt.Codeunit.al | 70 +++++++++++++++++++ 7 files changed, 76 insertions(+), 24 deletions(-) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 9c36348df9f..92486fb2dea 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -1978,9 +1978,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5724,7 +5721,7 @@ codeunit 6620 "Copy Document Mgt." [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index e820f661506..dc5b93449c0 100644 --- a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -1984,9 +1984,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5728,7 +5725,7 @@ codeunit 6620 "Copy Document Mgt." [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 4f0b73d74f4..95867ed6ad4 100644 --- a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -1993,9 +1993,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5740,7 +5737,7 @@ codeunit 6620 "Copy Document Mgt." [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 2da5cbe7f21..eebf93d84e7 100644 --- a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -1971,9 +1971,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5714,7 +5711,7 @@ codeunit 6620 "Copy Document Mgt." [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index bac1b81983d..bd249dfd86c 100644 --- a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -1974,9 +1974,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5731,7 +5728,7 @@ codeunit 6620 "Copy Document Mgt." [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index ecf0f8d4438..4db6a271780 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -1972,9 +1972,6 @@ codeunit 6620 "Copy Document Mgt." OnAfterRecalculateSalesLine(ToSalesHeader, ToSalesLine, FromSalesHeader, FromSalesLine, CopyThisLine); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure HandleAsmAttachedToSalesLine(var ToSalesLine: Record "Sales Line") var AssemblyItem: Record Item; @@ -5715,7 +5712,7 @@ codeunit 6620 "Copy Document Mgt." [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] + [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al index df3c6ad102c..e89e3134dd1 100644 --- a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al @@ -1860,6 +1860,76 @@ codeunit 137212 "SCM Copy Document Mgt." Assert.RecordCount(AssemblyLine, 1); end; + [Test] + [HandlerFunctions('MessageHandler')] + [Scope('OnPrem')] + procedure CopyArchivedSalesQuoteWithATOAsTeamMember() + var + Item: Record Item; + AssemblyItem: Record Item; + FromSalesHeader: Record "Sales Header"; + FromSalesLine: Record "Sales Line"; + SalesHeaderArchive: Record "Sales Header Archive"; + ToSalesHeader: Record "Sales Header"; + ToSalesLine: Record "Sales Line"; + AssemblyHeader: Record "Assembly Header"; + ArchiveManagement: Codeunit ArchiveManagement; + LibraryLowerPermissions: Codeunit "Library - Lower Permissions"; + Qty: Decimal; + begin + // [FEATURE] [Assemble-to-Order] [Copy Document] [Permissions] [Archive] + // [SCENARIO] AB#630947: A user restricted to the D365 Team Member permission set can copy an archived sales quote + // whose line has an assemble-to-order link, exercising the separately elevated CopySalesDocSalesLineArchive path, + // and the copy reproduces the ATO link on the target line. + Initialize(); + + // [GIVEN] Assemble-to-order item with a single item component + LibraryInventory.CreateItem(Item); + Item.Validate("Replenishment System", Item."Replenishment System"::Assembly); + Item.Validate("Assembly Policy", Item."Assembly Policy"::"Assemble-to-Order"); + Item.Modify(true); + LibraryAssembly.CreateAssemblyList( + AssemblyItem."Costing Method"::Standard, Item."No.", true, 1, 0, 0, LibraryRandom.RandInt(5), '', ''); + + // [GIVEN] Source sales quote with the ATO item; validating the item auto-creates the ATO link + Qty := LibraryRandom.RandIntInRange(2, 10); + LibrarySales.CreateSalesDocumentWithItem( + FromSalesHeader, FromSalesLine, FromSalesHeader."Document Type"::Quote, LibrarySales.CreateCustomerNo(), + Item."No.", Qty, '', WorkDate()); + + // [GIVEN] The source quote is archived + ArchiveManagement.StoreSalesDocument(FromSalesHeader, false); + SalesHeaderArchive.Get(FromSalesHeader."Document Type", FromSalesHeader."No.", 1, 1); + + // [GIVEN] Empty target sales quote created while the user still has full permissions + CreateEmptySalesHeader(ToSalesHeader, ToSalesHeader."Document Type"::Quote); + Commit(); + + // [GIVEN] User is now restricted to the D365 Team Member plan (regression harness for AB#630947) + LibraryE2EPlanPermissions.SetTeamMemberPlan(); + + // [WHEN] Copy Document is executed for the archived quote into the target quote + CopyDocumentMgt.SetProperties(true, false, false, false, true, false, false); + CopyDocumentMgt.SetArchDocVal(SalesHeaderArchive."Doc. No. Occurrence", SalesHeaderArchive."Version No."); + CopyDocumentMgt.CopySalesDoc("Sales Document Type From"::"Arch. Quote", SalesHeaderArchive."No.", ToSalesHeader); + + // [THEN] The copied line exists on the target quote with the same quantity and Qty. to Assemble to Order... + LibraryLowerPermissions.SetO365Full(); + ToSalesLine.SetRange("Document Type", ToSalesHeader."Document Type"); + ToSalesLine.SetRange("Document No.", ToSalesHeader."No."); + ToSalesLine.SetRange(Type, ToSalesLine.Type::Item); + ToSalesLine.SetRange("No.", Item."No."); + Assert.RecordCount(ToSalesLine, 1); + ToSalesLine.FindFirst(); + ToSalesLine.TestField(Quantity, Qty); + ToSalesLine.TestField("Qty. to Assemble to Order", Qty); + + // [THEN] ...and an Assembly Header is linked to the copied sales line + Assert.IsTrue( + ToSalesLine.AsmToOrderExists(AssemblyHeader), + 'Assemble-to-Order link should exist for the copied sales line.'); + end; + local procedure Initialize() var LibraryERMCountryData: Codeunit "Library - ERM Country Data"; From 2b45c1171be02764df63e591bfe243b85efe97ab Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 1 Sep 2026 11:00:56 +0530 Subject: [PATCH 14/17] Updated --- src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al index e89e3134dd1..4ec4ab363a3 100644 --- a/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/Tests/SCM/SCMCopyDocumentMgt.Codeunit.al @@ -1883,13 +1883,13 @@ codeunit 137212 "SCM Copy Document Mgt." // and the copy reproduces the ATO link on the target line. Initialize(); - // [GIVEN] Assemble-to-order item with a single item component + // [GIVEN] Assemble-to-order item with a resource component LibraryInventory.CreateItem(Item); Item.Validate("Replenishment System", Item."Replenishment System"::Assembly); Item.Validate("Assembly Policy", Item."Assembly Policy"::"Assemble-to-Order"); Item.Modify(true); LibraryAssembly.CreateAssemblyList( - AssemblyItem."Costing Method"::Standard, Item."No.", true, 1, 0, 0, LibraryRandom.RandInt(5), '', ''); + AssemblyItem."Costing Method"::Standard, Item."No.", true, 0, 1, 0, LibraryRandom.RandInt(5), '', ''); // [GIVEN] Source sales quote with the ATO item; validating the item auto-creates the ATO link Qty := LibraryRandom.RandIntInRange(2, 10); @@ -1909,7 +1909,9 @@ codeunit 137212 "SCM Copy Document Mgt." LibraryE2EPlanPermissions.SetTeamMemberPlan(); // [WHEN] Copy Document is executed for the archived quote into the target quote - CopyDocumentMgt.SetProperties(true, false, false, false, true, false, false); + // Recalculate lines is required: the sales line archive does not persist "Qty. to Assemble to Order", + // so the ATO quantity is re-derived from the item's assembly policy during the copy. + CopyDocumentMgt.SetProperties(true, true, false, false, true, false, false); CopyDocumentMgt.SetArchDocVal(SalesHeaderArchive."Doc. No. Occurrence", SalesHeaderArchive."Version No."); CopyDocumentMgt.CopySalesDoc("Sales Document Type From"::"Arch. Quote", SalesHeaderArchive."No.", ToSalesHeader); From 7199da8954cbbdc9075ef30cc0f1f8734553cc84 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 8 Sep 2026 13:30:44 +0530 Subject: [PATCH 15/17] update --- .../BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 4db6a271780..6adfab8eb9f 100644 --- a/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/W1/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -46,6 +46,11 @@ using System.Utilities; codeunit 6620 "Copy Document Mgt." { + Permissions = + tabledata "Assembly Header" = rim, + tabledata "Assembly Line" = rim, + tabledata "Assemble-to-Order Link" = rim; + trigger OnRun() begin end; @@ -439,9 +444,6 @@ codeunit 6620 "Copy Document Mgt." end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -595,9 +597,6 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -5710,9 +5709,6 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; From 1bb3bb79a9adc784bc1d252dbd4a73975c251174 Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 8 Sep 2026 13:48:10 +0530 Subject: [PATCH 16/17] Invoke Miapp --- .../BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 14 +++++--------- .../BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 14 +++++--------- .../BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 14 +++++--------- .../BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 14 +++++--------- .../BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 14 +++++--------- 5 files changed, 25 insertions(+), 45 deletions(-) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 92486fb2dea..12b54a7d1aa 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -47,6 +47,11 @@ codeunit 6620 "Copy Document Mgt." { Permissions = TableData "Cust. Ledger Entry" = rim; + Permissions = + tabledata "Assembly Header" = rim, + tabledata "Assembly Line" = rim, + tabledata "Assemble-to-Order Link" = rim; + trigger OnRun() begin end; @@ -442,9 +447,6 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -598,9 +600,6 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -5719,9 +5718,6 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index dc5b93449c0..0dfee713261 100644 --- a/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/IT/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -46,6 +46,11 @@ using System.Utilities; codeunit 6620 "Copy Document Mgt." { + Permissions = + tabledata "Assembly Header" = rim, + tabledata "Assembly Line" = rim, + tabledata "Assemble-to-Order Link" = rim; + trigger OnRun() begin end; @@ -438,9 +443,6 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -594,9 +596,6 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -5723,9 +5722,6 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 95867ed6ad4..445088fe526 100644 --- a/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NA/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -47,6 +47,11 @@ using System.Utilities; codeunit 6620 "Copy Document Mgt." { + Permissions = + tabledata "Assembly Header" = rim, + tabledata "Assembly Line" = rim, + tabledata "Assemble-to-Order Link" = rim; + trigger OnRun() begin end; @@ -449,9 +454,6 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -606,9 +608,6 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -5735,9 +5734,6 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index eebf93d84e7..3a5fd95f144 100644 --- a/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/NL/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -46,6 +46,11 @@ using System.Utilities; codeunit 6620 "Copy Document Mgt." { + Permissions = + tabledata "Assembly Header" = rim, + tabledata "Assembly Line" = rim, + tabledata "Assemble-to-Order Link" = rim; + trigger OnRun() begin end; @@ -438,9 +443,6 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -594,9 +596,6 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -5709,9 +5708,6 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; diff --git a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index bd249dfd86c..39b9bb69820 100644 --- a/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/RU/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -46,6 +46,11 @@ using System.Utilities; codeunit 6620 "Copy Document Mgt." { + Permissions = + tabledata "Assembly Header" = rim, + tabledata "Assembly Line" = rim, + tabledata "Assemble-to-Order Link" = rim; + trigger OnRun() begin end; @@ -440,9 +445,6 @@ codeunit 6620 "Copy Document Mgt." FromDocType.AsInteger(), FromDocNo, ToSalesHeader, FromDocOccurrenceNo, FromDocVersionNo, IncludeHeader, RecalculateLines, MoveNegLines); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'R', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'R', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLine(FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var AssemblyHeader: Record "Assembly Header"; @@ -596,9 +598,6 @@ codeunit 6620 "Copy Document Mgt." CopySalesReturnRcptLinesToDoc(ToSalesHeader, FromReturnRcptLine, LinesNotCopied, MissingExCostRevLink); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RIM', InherentPermissionsScope::Both)] procedure CopySalesDocSalesLineArchive(FromSalesHeaderArchive: Record "Sales Header Archive"; var ToSalesHeader: Record "Sales Header"; var LinesNotCopied: Integer; NextLineNo: Integer) var ToSalesLine: Record "Sales Line"; @@ -5726,9 +5725,6 @@ codeunit 6620 "Copy Document Mgt." exit(QtyNotShipped); end; - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Header", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assembly Line", 'RIM', InherentPermissionsScope::Both)] - [InherentPermissions(PermissionObjectType::TableData, Database::"Assemble-to-Order Link", 'RI', InherentPermissionsScope::Both)] local procedure CopyAsmOrderToAsmOrder(var TempFromAsmHeader: Record "Assembly Header" temporary; var TempFromAsmLine: Record "Assembly Line" temporary; ToSalesLine: Record "Sales Line"; ToAsmHeaderDocType: Option; ToAsmHeaderDocNo: Code[20]; InclAsmHeader: Boolean) var FromAsmHeader: Record "Assembly Header"; From 848d5eb42601668593d5464b1707993e58572ecd Mon Sep 17 00:00:00 2001 From: v-shikhverma Date: Tue, 8 Sep 2026 14:21:55 +0530 Subject: [PATCH 17/17] update --- src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al index 12b54a7d1aa..698a211b6e0 100644 --- a/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al +++ b/src/Layers/ES/BaseApp/Utilities/CopyDocumentMgt.Codeunit.al @@ -45,9 +45,7 @@ using System.Utilities; codeunit 6620 "Copy Document Mgt." { - Permissions = TableData "Cust. Ledger Entry" = rim; - - Permissions = + Permissions = TableData "Cust. Ledger Entry" = rim, tabledata "Assembly Header" = rim, tabledata "Assembly Line" = rim, tabledata "Assemble-to-Order Link" = rim;