diff --git a/src/Layers/W1/BaseApp/Integration/D365Sales/CRMOrderStatusUpdateJob.Codeunit.al b/src/Layers/W1/BaseApp/Integration/D365Sales/CRMOrderStatusUpdateJob.Codeunit.al index 861ca917f8a..dfa71c77f5f 100644 --- a/src/Layers/W1/BaseApp/Integration/D365Sales/CRMOrderStatusUpdateJob.Codeunit.al +++ b/src/Layers/W1/BaseApp/Integration/D365Sales/CRMOrderStatusUpdateJob.Codeunit.al @@ -58,6 +58,7 @@ codeunit 5352 "CRM Order Status Update Job" begin IntegrationTableMapping.SetRange(Type, IntegrationTableMapping.Type::Dataverse); IntegrationTableMapping.SetRange("Table ID", DATABASE::"Sales Header"); + OnUpdateSalesOrdersOnBeforeFindIntegrationTableMapping(IntegrationTableMapping); if IntegrationTableMapping.FindFirst() then IntegrationTableSynch.BeginIntegrationSynchJob(TABLECONNECTIONTYPE::CRM, IntegrationTableMapping, DATABASE::"Sales Header") else @@ -258,5 +259,10 @@ codeunit 5352 "CRM Order Status Update Job" if CRMPostBuffer.Get(TempCRMPostBuffer.ID) then CRMPostBuffer.Delete(); end; + + [IntegrationEvent(false, false)] + local procedure OnUpdateSalesOrdersOnBeforeFindIntegrationTableMapping(var IntegrationTableMapping: Record "Integration Table Mapping") + begin + end; } diff --git a/src/Layers/W1/BaseApp/Integration/Dataverse/CRMIntegrationManagement.Codeunit.al b/src/Layers/W1/BaseApp/Integration/Dataverse/CRMIntegrationManagement.Codeunit.al index 4c1e5ed2122..f0e3876d06c 100644 --- a/src/Layers/W1/BaseApp/Integration/Dataverse/CRMIntegrationManagement.Codeunit.al +++ b/src/Layers/W1/BaseApp/Integration/Dataverse/CRMIntegrationManagement.Codeunit.al @@ -1254,6 +1254,7 @@ codeunit 5330 "CRM Integration Management" exit; end; + OnRemoveCouplingOnBeforeGetIntegrationTableMappingForUncoupling(IntegrationTableMapping, LocalRecordRef); if GetIntegrationTableMappingForUncoupling(IntegrationTableMapping, LocalRecordRef.Number()) then if Schedule then ScheduleUncoupling(IntegrationTableMapping, IntegrationRecordSynch.GetTableViewForLocalRecords(LocalRecordRef), '') @@ -1340,6 +1341,7 @@ codeunit 5330 "CRM Integration Management" exit; end; + OnMatchBasedCouplingOnBeforeGetIntegrationTableMappingForMatchBasedCoupling(IntegrationTableMapping, LocalRecordRef); if GetIntegrationTableMappingForCoupling(IntegrationTableMapping, LocalRecordRef.Number()) then begin IntegrationFieldMapping.SetMatchBasedCouplingFilters(IntegrationTableMapping); if Page.RunModal(Page::"Match Based Coupling Criteria", IntegrationFieldMapping) = Action::LookupOK then @@ -4257,4 +4259,14 @@ codeunit 5330 "CRM Integration Management" local procedure OnBeforeRescheduleJobQueueEntries(TableNo: Integer; var RescheduleOffSetInMs: Integer) begin end; + + [IntegrationEvent(false, false)] + local procedure OnRemoveCouplingOnBeforeGetIntegrationTableMappingForUncoupling(var IntegrationTableMapping: Record "Integration Table Mapping"; LocalRecordRef: RecordRef) + begin + end; + + [IntegrationEvent(false, false)] + local procedure OnMatchBasedCouplingOnBeforeGetIntegrationTableMappingForMatchBasedCoupling(var IntegrationTableMapping: Record "Integration Table Mapping"; LocalRecordRef: RecordRef) + begin + end; } \ No newline at end of file diff --git a/src/Layers/W1/BaseApp/Integration/Dataverse/CouplingRecordBuffer.Table.al b/src/Layers/W1/BaseApp/Integration/Dataverse/CouplingRecordBuffer.Table.al index 51b28423b77..b539ff265a5 100644 --- a/src/Layers/W1/BaseApp/Integration/Dataverse/CouplingRecordBuffer.Table.al +++ b/src/Layers/W1/BaseApp/Integration/Dataverse/CouplingRecordBuffer.Table.al @@ -224,6 +224,8 @@ table 5332 "Coupling Record Buffer" "Saved CRM Option Id" := "CRM Option Id"; end; end; + + OnAfterInitialize(Rec); end; procedure Initialize(NAVRecordID: RecordID) @@ -426,5 +428,10 @@ table 5332 "Coupling Record Buffer" local procedure OnFindCRMOptionByName(CRMTableID: Integer; var EntityName: Text; var FieldName: Text; var Handled: Boolean) begin end; + + [IntegrationEvent(false, false)] + local procedure OnAfterInitialize(var CouplingRecordBuffer: Record "Coupling Record Buffer") + begin + end; }