[EventSubscriber(ObjectType::Codeunit, Codeunit::"CDS Setup Defaults", 'OnAfterResetCustomerAccountMapping', '', true, true)]
local procedure HandleOnAfterResetCustomerAccountMapping(IntegrationTableMappingName: Code[20])
var
CDSAccount: Record "CRM Account";
CustomerRec: Record Customer;
IntegrationFieldMapping: Record "Integration Field Mapping";
begin
//CDSAccountID for Customer
InsertIntegrationFieldMapping(IntegrationTableMappingName, CustomerRec.FieldNo("NXN CDS Account ID"), CDSAccount.FieldNo(AccountId), IntegrationFieldMapping.Direction::Bidirectional, '', true, false);
InsertIntegrationFieldMapping(IntegrationTableMappingName, CustomerRec.FieldNo("No."), CDSAccount.FieldNo(ceda_BC), IntegrationFieldMapping.Direction::Bidirectional, '', true, false);
end;