Skip to content

[W1][Table][5330][CRM Connection Setup] Add Event to Skip ResetSalesOrderMappingConfiguration #29480

@az-ha

Description

@az-ha

Why do you need this change?

When enabling CRM Connection Setup, all table mappings, field mappings, and job queue entries are reset to their default values.

With every major Business Central update, we are required to redeploy the CRM solution to upgrade it to the latest version. This process forces us to:

  1. Disable the CRM Connection
  2. Redeploy the solution
  3. Enable the CRM Connection again

Re-enabling the connection always resets all customer-specific mappings and job queue settings. This frequently causes sync issues such as duplicate records and overwritten data.

To mitigate this risk, we need a way to skip the automatic reset of the CRM configuration during re-enablement.

The main ResetConfiguration function in the CRM Setup Defaults codeunit already contains an event

Image

However, the Sales Order mapping is reset in a separate location, directly in the OnValidate trigger of the "Is Enabled" field. This reset cannot be bypassed, which makes it impossible to fully prevent the configuration reset even when handling the main reset through an event.

Image

Describe the request

We need to be able to skip the line CRMSetupDefaults.ResetSalesOrderMappingConfiguration(Rec)

Image

A new event with an IsHandled above this line would be enough. Alternatively, an event could be added inside the ResetSalesOrderMappingConfiguration function in the Codeunit "CRM Setup Defaults":

Image Internal work item: [AB#616640](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/616640)

Metadata

Metadata

Assignees

No one assigned

    Labels

    IntegrationGitHub request for Integration areaevent-requestRequest for adding an eventmissing-infoThe issue misses information that prevents it from completion.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions