Codeunit 5334 "CRM Setup Defaults"/Codeunit 7204 "CDS Setup Defaults", event request in ResetConfiguration
Hi,
We wish to have an event in function ResetConfiguration in codeunit 5334/7204 before table mappings are reset to prevent it from resetting all integration table mappings. If we have added adjustments to the table mappings in a production environment, and then copy this environment to a sandbox, the integration is automatically disabled. When enabling it again, all table mappings are reset and now we need to have custom functions to restore the mappings.
Thanks, Linda
Please provide the signature of the event along with the fragments of code that could define location of the event call unambiguously. The best way is to copy the actual AL code you would implement.
Of course, I'm sorry I left that out. This is my suggestion:
procedure ResetConfiguration(var CDSConnectionSetup: Record "CDS Connection Setup") var CDSIntegrationMgt: Codeunit "CDS Integration Mgt."; IsHandled : Boolean; begin IsHandled := false; OnBeforeResetConfiguration(CDSConnectionSetup, IsHandled); if IsHandled then exit;
[IntegrationEvent(false, false)] local procedure OnBeforeResetConfiguration(var CDSConnectionSetup: Record "CDS Connection Setup"; var IsHandled: Boolean) begin end;
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.
Great, thanks a lot!