Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Apps/W1/HybridSL/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
"logo": "ExtensionLogo.png",
"screenshots": [],
"platform": "27.0.0.0",
"internalsVisibleTo": [
{
"id": "c9b38161-dd8d-40a9-8920-60ccbf8d7a59",
"name": "Dynamics SL Migration Tests",
"publisher": "Microsoft"
}
],
"application": "27.0.0.0",
"dependencies": [
{
Expand Down Expand Up @@ -43,6 +50,5 @@
"features": [
"TranslationFile",
"NoImplicitWith"
],
"runtime": "14.0"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,24 @@ codeunit 47018 "SL Customer Migrator"
PaymentTermsFormula: DateFormula;
Country: Code[10];
ShipViaID: Code[10];
CustomerBlocked: Boolean;
ContactAddressFormatToSet: Option First,"After Company Name",Last;
AddressFormatToSet: Option "Post Code+City","City+Post Code","City+County+Post Code","Blank Line+Post Code+City";
SLTaxTypeGroupTxt: Label 'G', Locked = true;
begin
if not CustomerDataMigrationFacade.CreateCustomerIfNeeded(SLCustomer.CustId, CopyStr(SLHelperFunctions.NameFlip(SLCustomer.Name), 1, 50)) then
exit;

if SLCustomer.Status = StatusInactiveTxt then
if SLCompanyAdditionalSettings.Get(CompanyName()) then
if not SLCompanyAdditionalSettings."Migrate Inactive Customers" then begin
DecrementMigratedCount();
exit;
end;
end else
CustomerBlocked := true;

if not CustomerDataMigrationFacade.CreateCustomerIfNeeded(SLCustomer.CustId, CopyStr(SLHelperFunctions.NameFlip(SLCustomer.Name), 1, 50)) then
exit;

if CustomerBlocked then
CustomerDataMigrationFacade.SetBlocked("Customer Blocked"::All);

DataMigrationErrorLogging.SetLastRecordUnderProcessing(Format(SLCustomer.RecordId));

Expand Down Expand Up @@ -313,6 +318,8 @@ codeunit 47018 "SL Customer Migrator"
end;

CustomerDataMigrationFacade.ModifyCustomer(true);

MigrateCustomerAddresses(SLCustomer);
end;

internal procedure MigrateCustomerAddresses(SLCustomer: Record "SL Customer")
Expand Down Expand Up @@ -354,7 +361,6 @@ codeunit 47018 "SL Customer Migrator"
DataMigrationErrorLogging.SetLastRecordUnderProcessing(Format(RecordIdToMigrate));
SLARSetup.Get(ARSetupIDTxt);
MigrateCustomerDetails(SLCustomer, Sender, SLARSetup);
MigrateCustomerAddresses(SLCustomer);
end;

internal procedure MigrateCustomerPostingGroups(var Sender: Codeunit "Customer Data Migration Facade"; RecordIdToMigrate: RecordId; ChartOfAccountsMigrated: Boolean)
Expand All @@ -374,11 +380,13 @@ codeunit 47018 "SL Customer Migrator"
if RecordIdToMigrate.TableNo() <> Database::"SL Customer" then
exit;

DataMigrationErrorLogging.SetLastRecordUnderProcessing(Format(RecordIdToMigrate));

SLCustomer.Get(RecordIdToMigrate);
ClassID := SLCustomer.ClassId;
if SLcustomer.Status = StatusInactiveTxt then
if not SLCompanyAdditionalSettings."Migrate Inactive Customers" then
exit;

DataMigrationErrorLogging.SetLastRecordUnderProcessing(Format(RecordIdToMigrate));
ClassID := SLCustomer.ClassId;
if ClassID = '' then
exit;
SLCustClass.Get(ClassID);
Expand Down
222 changes: 126 additions & 96 deletions Apps/W1/HybridSL/app/src/Migration/Items/SLItemMigrator.Codeunit.al

Large diffs are not rendered by default.

Loading
Loading