KVSEDX Monitor Mgt.#
Procedures#
FindRecords(Record KVSEDX Monitor Entry, RecordId) :#
procedure FindRecords(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; SourceRecordId: RecordId):
InsertInOutMessages(Record KVSEDX Monitor Entry, RecordId) :#
Summary: This function is used to add monitor records if records exist for the specified RecordId in the EDX Inbound, Outbound and Archive tables.
procedure InsertInOutMessages(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; SourceRecordId: RecordId):
Parameters:
TempKVSEDXMonitorEntry
: Monitor EntrySourceRecordId
: Source Record Id
InsertEntry(Record KVSEDX Monitor Entry, RecordId, Code[30], Code[30], Text[30], DateTime, Enum KVSEDX Channel) :#
Summary: This function can be used to add a monitor data record if no data record exists for the specified RecordId in the EDX Inbound, Outbound and Archive tables.
procedure InsertEntry(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; SourceRecordId: RecordId; PartnerNo: Code[30]; DocumentCode: Code[30]; EDXStatus: Text[30]; DocumentDateTime: DateTime; Direction: Enum "KVSEDX Channel"):
Parameters:
TempKVSEDXMonitorEntry
: Monitor EntrySourceRecordId
:PartnerNo
: EDX PartnerDocumentCode
: EDX Document CodeEDXStatus
:DocumentDateTime
:Direction
: Inbound/Outbound
ShowMonitor(RecordId) :#
Summary: Shows the EDX Monitor for a given RecordId
procedure ShowMonitor(SourceRecordId: RecordId):
Parameters:
SourceRecordId
:
Events#
OnEnableMonitorAction(Variant, Boolean) :#
Summary: The event is fired when a BC Standard Page, e.g. sales quote, is displayed. The “Show Monitor†action is only active if the “KVSEDX Partner†field contains a value. This event can be used to control whether the action should also be active under other conditions
[IntegrationEvent(true, false)]
local procedure OnEnableMonitorAction(SourceRecord: Variant; var IsEnabled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnEnableMonitorAction', '', false, false)]
local procedure DoSomethingOnEnableMonitorAction(SourceRecord: Variant; var IsEnabled: Boolean)
begin
end;
Parameters:
SourceRecord
: Current Record as variantIsEnabled
: Enable or disable EDX Monitor action
Example: Note: The characters for greater than and less than cannot be used in the code example!
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnEnableMonitorAction', '', false, false)]
local procedure MyOnEnableMonitorAction(SourceRecord: Variant; var IsEnabled: Boolean)
var
SalesHeader: Record "Sales Header";
SourceRecordRef: RecordRef;
begin
SourceRecordRef.GetTable(SourceRecord);
if (SourceRecordRef.Number NotEqual Database::"Sales Header") then
exit;
SourceRecordRef.SetTable(SalesHeader);
IsEnabled := (SalesHeader."KVSEDX Partner No." NotEqual '') or (SalesHeader."KVS Wenbshop Partner No." NotEqual '');
end;
OnSetSalesHeaderDocumentType(Record KVSEDX Sales Header, Record Sales Header, Boolean) :#
Summary: The event is fired if an "EDX Sales Header". "EDX Document Type" has been extended in the customer project. In this case, "Sales Header"."Document Type" must be initialized.
[IntegrationEvent(true, false)]
local procedure OnSetSalesHeaderDocumentType(var KVSEDXSalesHeader: Record "KVSEDX Sales Header"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnSetSalesHeaderDocumentType', '', false, false)]
local procedure DoSomethingOnSetSalesHeaderDocumentType(var KVSEDXSalesHeader: Record "KVSEDX Sales Header"; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXSalesHeader
: Current EDX Sales HeaderSalesHeader
: Current Sales HeaderIsHandled
: if not handled then search skip this record
OnSetPurchaseHeaderDocumentType(Record KVSEDX Purchase Header, Record Purchase Header, Boolean) :#
Summary: The event is fired if an "EDX Purchase Header". "EDX Document Type" has been extended in the customer project. In this case, "Purchase Header"."Document Type" must be initialized.
[IntegrationEvent(true, false)]
local procedure OnSetPurchaseHeaderDocumentType(var KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnSetPurchaseHeaderDocumentType', '', false, false)]
local procedure DoSomethingOnSetPurchaseHeaderDocumentType(var KVSEDXPurchaseHeader: Record "KVSEDX Purchase Header"; var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseHeader
: Current EDX Purchase HeaderPurchaseHeader
: Current Purchase HeaderIsHandled
: if not handled then search skip this record
OnSetPurchaseReceiptHeaderDocumentType(Record KVSEDX Purch. Receipt Header, Record Purch. Rcpt. Header, Boolean) :#
Summary: The event is fired if an "EDX Purchase ReceiptHeader". "EDX Document Type" has been extended in the customer project. In this case, "Purchase Header"."Document Type" must be initialized.
[IntegrationEvent(true, false)]
local procedure OnSetPurchaseReceiptHeaderDocumentType(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnSetPurchaseReceiptHeaderDocumentType', '', false, false)]
local procedure DoSomethingOnSetPurchaseReceiptHeaderDocumentType(var KVSEDXPurchReceiptHeader: Record "KVSEDX Purch. Receipt Header"; var PurchRcptHeader: Record "Purch. Rcpt. Header"; var IsHandled: Boolean)
begin
end;
Parameters:
KVSEDXPurchaseHeader
: Current EDX Purchase HeaderPurchaseHeader
: Current Purchase HeaderIsHandled
: if not handled then search skip this record
OnFindRecordUnhandledTable(Record KVSEDX Monitor Entry, RecordId, Boolean) :#
Summary: This event is fired if an unhandled table is recognized in the FindRecords function. Example: In the customer project, EDX is extended to include the import of warehouse shipments. The table "KVSWarehouseShipment" is created as an EDX intermediate document. When the message is received, an EDX inbound with the RecordId [KVSWarehouseShipment, xxx] is created accordingly. The event is triggered for this RecordId. If the warehouse shipment has already been created, the data record for the Warehouse Shipment can be written to the TempKVSEDXMonitorEntry table within the event.
[IntegrationEvent(true, false)]
local procedure OnFindRecordUnhandledTable(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; var SourceRecordId: RecordId; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnFindRecordUnhandledTable', '', false, false)]
local procedure DoSomethingOnFindRecordUnhandledTable(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; var SourceRecordId: RecordId; var IsHandled: Boolean)
begin
end;
Parameters:
TempKVSEDXMonitorEntry
: Temp KVSEDX Monitor EntrySourceRecordId
: Source RecordIdIsHandled
: if not handled then search skip this record
OnBeforeFindRecords(Record KVSEDX Monitor Entry, RecordId, Boolean) :#
Summary: The event is fired before populate Monitor Data In this case, "Sales Header". "Document Type" must be initialized.
[IntegrationEvent(true, false)]
local procedure OnBeforeFindRecords(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; var SourceRecordId: RecordId; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnBeforeFindRecords', '', false, false)]
local procedure DoSomethingOnBeforeFindRecords(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; var SourceRecordId: RecordId; var IsHandled: Boolean)
begin
end;
Parameters:
TempKVSEDXMonitorEntry
: Temp KVSEDX Monitor EntrySourceRecordId
: Source RecordIdIsHandled
:
OnAfterFindRecords(Record KVSEDX Monitor Entry, RecordId, Boolean) :#
Summary: The event is fired after populate Monitor Data In this case, "Sales Header". "Document Type" must be initialized.
[IntegrationEvent(true, false)]
local procedure OnAfterFindRecords(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; var SourceRecordId: RecordId; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnAfterFindRecords', '', false, false)]
local procedure DoSomethingOnAfterFindRecords(var TempKVSEDXMonitorEntry: Record "KVSEDX Monitor Entry" temporary; var SourceRecordId: RecordId; var IsHandled: Boolean)
begin
end;
Parameters:
TempKVSEDXMonitorEntry
: Temp KVSEDX Monitor EntrySourceRecordId
: Source RecordIdIsHandled
:
OnGetEDXStatusFieldNo(RecordRef, Integer, Boolean) :#
Summary: This event is fired when the field number for the "EDX Status" field is required. If the status field name matches the search criteria '@*EDX Status', then the event does not need to be subscribed to. Example: A new EDX intermediate document is implemented in the customer project. The status field that represents the EDX status (enum "KVSEDX Status EDX Document") has the name "KVS Status" with field number 10. FieldNo 10 must be returned.
[IntegrationEvent(true, false)]
local procedure OnGetEDXStatusFieldNo(EDXDocumentRecordRef: RecordRef; var FieldNo: Integer; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSEDX Monitor Mgt.", 'OnGetEDXStatusFieldNo', '', false, false)]
local procedure DoSomethingOnGetEDXStatusFieldNo(EDXDocumentRecordRef: RecordRef; var FieldNo: Integer; var IsHandled: Boolean)
begin
end;
Parameters:
EDXDocumentRecordRef
: RecordRef for EDX intermediate documentFieldNo
: FieldNo for Status fieldIsHandled
: