ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Codeunit 5334 "CRM Setup Defaults"/Codeunit 7204 "CDS Setup Defaults", event request in ResetConfiguration

Open ligoendeavor opened this issue 6 years ago • 4 comments

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

ligoendeavor avatar Jul 02 '20 09:07 ligoendeavor

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.

StanPesotskiy avatar Jul 03 '20 06:07 StanPesotskiy

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;

ligoendeavor avatar Jul 06 '20 05:07 ligoendeavor

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.

bc-ghost avatar Jul 08 '20 06:07 bc-ghost

Great, thanks a lot!

ligoendeavor avatar Jul 08 '20 06:07 ligoendeavor