Codeunit "PostPurch-Delete"

ID 364
Namespace: Microsoft.Purchases.History

Properties

Name Value
Permissions TableData "Purch. Rcpt. Header" = ri, TableData "Purch. Rcpt. Line" = rid, TableData "Purch. Inv. Header" = ri, TableData "Purch. Inv. Line" = rid, TableData "Purch. Cr. Memo Hdr." = ri, TableData "Purch. Cr. Memo Line" = rid, TableData "Return Shipment Header" = ri, TableData "Return Shipment Line" = rid

Methods

DeleteHeader

procedure DeleteHeader(PurchHeader: Record "Purchase Header", var PurchRcptHeader: Record "Purch. Rcpt. Header", var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", var ReturnShptHeader: Record "Return Shipment Header", var PurchInvHeaderPrepmt: Record "Purch. Inv. Header", var PurchCrMemoHdrPrepmt: Record "Purch. Cr. Memo Hdr.")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchRcptHeader Table Microsoft.Purchases.History."Purch. Rcpt. Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
ReturnShptHeader Table Microsoft.Purchases.History."Return Shipment Header"
PurchInvHeaderPrepmt Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdrPrepmt Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."

DeletePurchRcptLines

procedure DeletePurchRcptLines(PurchRcptHeader: Record "Purch. Rcpt. Header")

Parameters

Name Type Description
PurchRcptHeader Table Microsoft.Purchases.History."Purch. Rcpt. Header"

DeletePurchInvLines

procedure DeletePurchInvLines(PurchInvHeader: Record "Purch. Inv. Header")

Parameters

Name Type Description
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"

DeletePurchCrMemoLines

procedure DeletePurchCrMemoLines(PurchCrMemoHeader: Record "Purch. Cr. Memo Hdr.")

Parameters

Name Type Description
PurchCrMemoHeader Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."

DeletePurchShptLines

procedure DeletePurchShptLines(ReturnShptHeader: Record "Return Shipment Header")

Parameters

Name Type Description
ReturnShptHeader Table Microsoft.Purchases.History."Return Shipment Header"

InitDeleteHeader

procedure InitDeleteHeader(PurchHeader: Record "Purchase Header", var PurchRcptHeader: Record "Purch. Rcpt. Header", var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", var ReturnShptHeader: Record "Return Shipment Header", var PurchInvHeaderPrepmt: Record "Purch. Inv. Header", var PurchCrMemoHdrPrepmt: Record "Purch. Cr. Memo Hdr.", SourceCode: Code[10])

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchRcptHeader Table Microsoft.Purchases.History."Purch. Rcpt. Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
ReturnShptHeader Table Microsoft.Purchases.History."Return Shipment Header"
PurchInvHeaderPrepmt Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdrPrepmt Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
SourceCode Code[10]

IsDocumentDeletionAllowed

procedure IsDocumentDeletionAllowed(PostingDate: Date)

Parameters

Name Type Description
PostingDate Date

Events

OnAfterDeleteHeader

[IntegrationEvent(False,False)]
local procedure OnAfterDeleteHeader(var PurchaseHeader: Record "Purchase Header", var PurchRcptHeader: Record "Purch. Rcpt. Header", var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", var ReturnShipmentHeader: Record "Return Shipment Header", var PurchInvHeaderPrepmt: Record "Purch. Inv. Header", var PurchCrMemoHdrPrepmt: Record "Purch. Cr. Memo Hdr.")

Parameters

Name Type Description
PurchaseHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchRcptHeader Table Microsoft.Purchases.History."Purch. Rcpt. Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
ReturnShipmentHeader Table Microsoft.Purchases.History."Return Shipment Header"
PurchInvHeaderPrepmt Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdrPrepmt Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."

OnAfterInitDeleteHeader

[IntegrationEvent(False,False)]
local procedure OnAfterInitDeleteHeader(var PurchHeader: Record "Purchase Header", var PurchRcptHeader: Record "Purch. Rcpt. Header", var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", var ReturnShptHeader: Record "Return Shipment Header", var PurchInvHeaderPrepmt: Record "Purch. Inv. Header", var PurchCrMemoHdrPrepmt: Record "Purch. Cr. Memo Hdr.")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchRcptHeader Table Microsoft.Purchases.History."Purch. Rcpt. Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
ReturnShptHeader Table Microsoft.Purchases.History."Return Shipment Header"
PurchInvHeaderPrepmt Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdrPrepmt Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."

OnAfterInitPurchInvHeader

[IntegrationEvent(False,False)]
local procedure OnAfterInitPurchInvHeader(var PurchInvHeader: Record "Purch. Inv. Header", PurchHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"

OnAfterInitPurchInvHeaderPrepmt

[IntegrationEvent(False,False)]
local procedure OnAfterInitPurchInvHeaderPrepmt(var PurchInvHeaderPrepmt: Record "Purch. Inv. Header", PurchHeader: Record "Purchase Header")

Parameters

Name Type Description
PurchInvHeaderPrepmt Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"

OnBeforeDeleteHeader

[IntegrationEvent(False,False)]
local procedure OnBeforeDeleteHeader(var PurchHeader: Record "Purchase Header", var IsHandled: Boolean, var PurchRcptHeader: Record "Purch. Rcpt. Header", var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", var ReturnShipmentHeader: Record "Return Shipment Header", var PurchInvHeaderPrepmt: Record "Purch. Inv. Header", var PurchCrMemoHdrPrepmt: Record "Purch. Cr. Memo Hdr.")

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
IsHandled Boolean
PurchRcptHeader Table Microsoft.Purchases.History."Purch. Rcpt. Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
ReturnShipmentHeader Table Microsoft.Purchases.History."Return Shipment Header"
PurchInvHeaderPrepmt Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdrPrepmt Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."

OnBeforeDeletePurchRcptLines

[IntegrationEvent(False,False)]
local procedure OnBeforeDeletePurchRcptLines(PurchRcptLine: Record "Purch. Rcpt. Line")

Parameters

Name Type Description
PurchRcptLine Table Microsoft.Purchases.History."Purch. Rcpt. Line"

OnBeforeDeletePurchInvLines

[IntegrationEvent(False,False)]
local procedure OnBeforeDeletePurchInvLines(PurchInvLine: Record "Purch. Inv. Line")

Parameters

Name Type Description
PurchInvLine Table Microsoft.Purchases.History."Purch. Inv. Line"

OnBeforeDeletePurchCrMemoLines

[IntegrationEvent(False,False)]
local procedure OnBeforeDeletePurchCrMemoLines(PurchCrMemoLine: Record "Purch. Cr. Memo Line")

Parameters

Name Type Description
PurchCrMemoLine Table Microsoft.Purchases.History."Purch. Cr. Memo Line"

OnBeforeDeletePurchShptLines

[IntegrationEvent(False,False)]
local procedure OnBeforeDeletePurchShptLines(ReturnShptLine: Record "Return Shipment Line")

Parameters

Name Type Description
ReturnShptLine Table Microsoft.Purchases.History."Return Shipment Line"

OnBeforeInitDeleteHeader

[IntegrationEvent(False,False)]
local procedure OnBeforeInitDeleteHeader(var PurchHeader: Record "Purchase Header", var PurchRcptHeader: Record "Purch. Rcpt. Header", var PurchInvHeader: Record "Purch. Inv. Header", var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr.", var ReturnShptHeader: Record "Return Shipment Header", var PurchInvHeaderPrepmt: Record "Purch. Inv. Header", var PurchCrMemoHdrPrepmt: Record "Purch. Cr. Memo Hdr.", var SourceCode: Code[10])

Parameters

Name Type Description
PurchHeader Table Microsoft.Purchases.Document."Purchase Header"
PurchRcptHeader Table Microsoft.Purchases.History."Purch. Rcpt. Header"
PurchInvHeader Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdr Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
ReturnShptHeader Table Microsoft.Purchases.History."Return Shipment Header"
PurchInvHeaderPrepmt Table Microsoft.Purchases.History."Purch. Inv. Header"
PurchCrMemoHdrPrepmt Table Microsoft.Purchases.History."Purch. Cr. Memo Hdr."
SourceCode Code[10]

See also