Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
permissionset 80263 "PTE CIM 1 Permission"
{
Assignable = true;
Permissions = tabledata "PTE CIM 1 Upg. TT Device" = RIMD,
tabledata "PTE CIM 1 Upg. TT. Controller" = RIMD,
tabledata "PTE CIM 1 Upg. TT. Cost Center" = RIMD,
table "PTE CIM 1 Upg. TT Device" = X,
table "PTE CIM 1 Upg. TT. Controller" = X,
table "PTE CIM 1 Upg. TT. Cost Center" = X,
codeunit "PTE CIM 1 - UPG Functions" = X;
Permissions = tabledata "PTE CIM 1 Upg. TT Device"=RIMD,
tabledata "PTE CIM 1 Upg. TT. Controller"=RIMD,
tabledata "PTE CIM 1 Upg. TT. Cost Center"=RIMD,
table "PTE CIM 1 Upg. TT Device"=X,
table "PTE CIM 1 Upg. TT. Controller"=X,
table "PTE CIM 1 Upg. TT. Cost Center"=X,
codeunit "PTE CIM 1 - UPG Functions"=X,
codeunit "PTE CIM 2 Upg. L. W."=X,
codeunit "PTE CIM 2 Upg. PrintVis L."=X,
codeunit "PTE CIM 2 Upg. PrintVis Tags"=X,
codeunit "PTE CIM 2 Upg. TT Codeunit"=X;
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ codeunit 80263 "PTE CIM 1 - UPG Functions"

procedure MoveCostCenterFieldToTable(MoveIntoPrintVis: Boolean; InsertAllowed: Boolean; ModifyAllowed: Boolean)
var
CostCenters: Record "PVS Cost Center";
CostCenterUpg: Record "PTE CIM 1 Upg. TT. Cost Center";
TableNoFromInt: Integer;
TableNoToInt: Integer;
begin
if CostCenterUpg.FindSet(false) then
repeat
if CostCenters.get(CostCenterUpg.Code) then begin
CostCenters."PVS CIM Device Code" := CostCenterUpg."PVS CIM Device Code";
CostCenters.Modify(false);
end;
until CostCenterUpg.Next() = 0;
if not IsCIMInstalled(MoveIntoPrintVis) then
exit;
if MoveIntoPrintVis then
exit;
TableNoFromInt := TableNoCostCenter;
TableNoToInt := Database::"PTE CIM 1 Upg. TT. Cost Center";
LoopTableAndMoveData(TableNoFromInt, TableNoToInt, InsertAllowed, ModifyAllowed);
end;

local procedure LoopTableAndMoveData(in_TableNoFromInt: Integer; in_TableNoToInt: Integer; InsertAllowed: Boolean; ModifyAllowed: Boolean)
Expand Down Expand Up @@ -141,15 +141,19 @@ codeunit 80263 "PTE CIM 1 - UPG Functions"
FieldToRec.SetRange(TableNo, in_TableNoToInt);
FieldToRec.SetRange("No.", FieldFromRec."No.");
if FieldToRec.IsEmpty() then
if isPTECIMInstalled then
FieldToRec.SetRange("No.", FieldFromRec."No." + 75000);
FieldToRec.SetRange("No.", FieldFromRec."No." + 75000);
if FieldToRec.IsEmpty() then
if FieldFromRec."No." = 75050 then
if isPTECIMInstalled then
if in_TableNoFromInt = Database::"PVS Cost Center" then
FieldToRec.SetRange("No.", 6010050);
if FieldToRec.FindFirst() then
TransferField(FieldFromRec, FieldToRec, fromRecRef, toRecRef);
until FieldFromRec.Next() = 0;
if InsertAllowed then
toRecRef.Insert(false);
if toRecRef.Insert(false) then;
if ModifyAllowed then
toRecRef.Modify(false);
if toRecRef.Modify(false) then;
until fromRecRef.Next() = 0;
end;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
codeunit 80266 "PTE CIM 2 Upg. TT Codeunit"//Get new object id
{
Subtype = Upgrade;
trigger OnCheckPreconditionsPerCompany()
begin
// Code to make sure company is OK to upgrade.
end;

trigger OnUpgradePerCompany()
Subtype = Install;
trigger OnInstallAppPerCompany()
begin
// Code to perform company related table upgrade tasks
UpgradeMoveDeviceToTempTable();
UpgradeMoveControllerToTempTable();
UpgradeMoveCostCenterFieldToTempTable();
end;

trigger OnValidateUpgradePerCompany()
begin
// Code to make sure that upgrade was successful for each company
end;

local procedure UpgradeMoveControllerToTempTable();
begin
if UpgradeTag.HasUpgradeTag(UpgradeTags.GetMoveControllerToTempTableTag()) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "c5fe08f2-b97e-43e8-adc1-2ee2cda7ee68",
"name": "PTE CIM 1 - upg temp tables",
"publisher": "PrintVis A/S",
"version": "1.0.0.10",
"version": "1.0.0.12",
"brief": "",
"description": "",
"privacyStatement": "",
Expand All @@ -24,7 +24,7 @@
"idRanges": [
{
"from": 80263,
"to": 80265
"to": 80269
}
],
"resourceExposurePolicy": {
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
codeunit 80270 "PTE CIM 3 Upg. TT Codeunit"//Get new object id
{
Subtype = Upgrade;
trigger OnCheckPreconditionsPerCompany()
begin
// Code to make sure company is OK to upgrade.
end;

trigger OnUpgradePerCompany()
Subtype = Install;
trigger OnInstallAppPerCompany()
begin
// Code to perform company related table upgrade tasks
UpgradeMoveDeviceToPrintVisTable();
Expand All @@ -15,11 +10,6 @@ codeunit 80270 "PTE CIM 3 Upg. TT Codeunit"//Get new object id
UpgradePVSCIMSystemJDFEnumValueInControllerTable();
end;

trigger OnValidateUpgradePerCompany()
begin
// Code to make sure that upgrade was successful for each company
end;

local procedure UpgradeMoveControllerToPrintVisTable();
begin
if UpgradeTag.HasUpgradeTag(UpgradeTags.GetMoveControllerToPrintVisTableTag()) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ codeunit 80271 "PTE CIM 3 Upg. PrintVis L."//Get new object id
end;

internal procedure MoveCostCenterFieldToPrintVisTable()
var
CostCenters: Record "PVS Cost Center";
CostCenterUpg: Record "PTE CIM 1 Upg. TT. Cost Center";
begin
upgfunctions.MoveCostCenterFieldToTable(true, false, true);
if CostCenterUpg.FindSet(false) then
repeat
if CostCenters.get(CostCenterUpg.Code) then begin
CostCenters."PVS CIM Device Code" := CostCenterUpg."PVS CIM Device Code";
if CostCenters.Modify(false) then;
end;
until CostCenterUpg.Next() = 0;
end;

internal procedure UpdatePVSCIMSystemJDFEnumValueInControllerTable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "94f222b0-63c2-429e-be8d-fad1f1a5dfb7",
"name": "PTE CIM 3 - Move Data into PrintVis",
"publisher": "PrintVis A/S",
"version": "1.0.0.1",
"version": "1.0.0.2",
"brief": "",
"description": "",
"privacyStatement": "",
Expand All @@ -15,13 +15,13 @@
"id": "5452f323-059e-499a-9753-5d2c07eef904",
"name": "PrintVis",
"publisher": "Novavision Software A/S",
"version": "25.0.0.0"
"version": "26.1.1.0"
},
{
"id": "c5fe08f2-b97e-43e8-adc1-2ee2cda7ee68",
"name": "PTE CIM 1 - Upg Temp tables",
"publisher": "Novavision Software A/S",
"version": "1.0.0.0"
"publisher": "PrintVis A/S",
"version": "1.0.0.12"
}
],
"screenshots": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ To limit the amount of breaking changes - the following has been done:
- *The same has been done to the tables "PVS CIM Controller" and "PVS CIM Device".*

An upgrade guide has been made, that needs to be followed to get data transferred from a older version into the newer version.
**#!!!WAIT!!!
#!!!This will not move custom fields in "PVS CIM Controller" and "PVS CIM Device"!!!
#!!!Add the custom fields into the 'PTE CIM 1 - upg temp tables'!!!**
*!!!When moving data on step 3, please verify the tables has data!!!*
*!!!Table 80265 for Cost Center - Device Code data being moved!!!*
*!!!Table 80264 for Controller data being moved!!!*
*!!!Table 80263 for Device data being moved!!!*

Cloud only needs to follow the information outlined above and below, where they can ignore the Powershell script
OnPrem / Container - use the appropriate Powershell script, before running the script - update the input section in the top of the script.

1. Install App 1 'PTE CIM 1 - upg temp tables'
*- triggers upgrade "move data from PrintVis into App 1"*

2. Install App 2 'PTE CIM 1 - Move Data into Temp'
*- trigger upgrade "move data from PrintVis into App 1"*
3. Install App 2 'PTE CIM 1 - Move Data into Temp' v.2
4. Uninstall + Remove App 2
5. Uninstall + Remove App 2 v.2
2. Uninstall + Unpublish 'PrintVis CIM'

6. Uninstall + Unpublish 'PrintVis CIM'

7. Install 'PrintVis' - version 26.1.1.0
8. Install 'PrintVis CIM' - version 26.1.1.0
3. Install 'PrintVis' - version 26.1.1.0
4. Install 'PrintVis CIM' - version 26.1.1.0
**- install with mode = Force**

9. Install App 3 'PTE CIM 1 - Move Data into PrintVis'
*- trigger upgrade "Move Data from App 1 into PrintVis CIM"*
10. Install App 3 'PTE CIM 1 - Move Data into PrintVis' v.2
11. Uninstall + Remove App 3
12. Uninstall + Remove App 3 v.2
5. Install App 3 'PTE CIM 1 - Move Data into PrintVis'
*- triggers upgrade "Move Data from App 1 into PrintVis CIM"*
6. Uninstall + Remove App 3
**- Delete Extension Data**

13. Go to the Browser and connect to the Business Central system and check if there exists data in PrintVis CIM Controller.
14. Verify Data exists in Controller + Device
15. Uninstall + Remove App 1 - **Delete Extension data**
7. Go to the Browser and connect to the Business Central system and check if there exists data in PrintVis CIM Controller.
8. Verify Data exists in CIM Controller + CIM Device + Cost Center.Device Code
9. Uninstall + Remove App 1 - **Delete Extension data**

16. Done
10. Done
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,24 @@ $PrintVisName = 'PrintVis'
$PrintVisCIMName = 'PrintVis CIM'

$Temp1Name = 'PTE CIM 1 - upg temp tables'
$Temp1Version = '1.0.0.11'
$Temp1Path = $path + 'PrintVis AS_PTE CIM 1 - upg temp tables_1.0.0.11.app'

$Temp2Name = 'PTE CIM 2 - Move Data into Temp'
$Temp2Version = '1.0.0.0'
$Temp2_2Version = '1.0.0.1'
$Temp2Path = $path + 'PrintVis AS_PTE CIM 2 - Move Data into Temp_1.0.0.0.app'
$Temp2_2Path = $path + 'PrintVis AS_PTE CIM 2 - Move Data into Temp_1.0.0.1.app'

$Temp1Version = '1.0.0.12'
$Temp1Path = $path + 'PrintVis AS_PTE CIM 1 - upg temp tables_1.0.0.12.app'

$Temp3Name = 'PTE CIM 3 - Move Data into PrintVis'
$Temp3Version = '1.0.0.0'
$Temp3Version = '1.0.0.2'

$Temp3Path = $path + 'PrintVis AS_PTE CIM 3 - Move Data into PrintVis_1.0.0.0.app'
$Temp3_2Path = $path + 'PrintVis AS_PTE CIM 3 - Move Data into PrintVis_1.0.0.1.app'
$Temp3Path = $path + 'PrintVis AS_PTE CIM 3 - Move Data into PrintVis_1.0.0.2.app'
#does not need to be updated


#Steps
#Install temp table app to data that needs to be moved
Publish-BcContainerApp $instance -appFile $Temp1Path -skipVerification -sync -install
Publish-BcContainerApp $instance -appFile $Temp1Path -skipVerification -sync -install -upgrade

#Now data needs to be moved into temp tables
Publish-BcContainerApp $instance -appFile $Temp2Path -skipVerification -sync -install
#Trigger upgrade step
Publish-BcContainerApp $instance -appFile $Temp2_2Path -sync -upgrade -install -skipVerification
#Upgrade to temp tables done
UnPublish-BcContainerApp $instance -name $Temp2Name -version $Temp2Version -unInstall -doNotSaveData
UnPublish-BcContainerApp $instance -name $Temp2Name -version $Temp2_2Version -unInstall -doNotSaveData
#Uninstall PrintVis CIM
Unpublish-BcContainerApp $instance -appName $PrintVisCIMName -version $PrintVisVersionCurrent -unInstall

#install PrintVis

#install PrintVis CIM
Publish-BcContainerApp $instance -appFile $PrintVisLibraryPath -skipVerification -sync
Publish-BcContainerApp $instance -appFile $PrintVisPath -skipVerification -sync
Unpublish-BcContainerApp $instance -appName $PrintVisName -version $PrintVisVersionCurrent -unInstall
Expand All @@ -63,12 +49,9 @@ Publish-BcContainerApp $instance -appFile $PrintVisCIMPath -syncMode ForceSync -

#Now data needs to be moved into PrintVis Tables
Publish-BcContainerApp $instance -appFile $Temp3Path -skipVerification -sync -install
#Trigger upgrade step
Publish-BcContainerApp $instance -appFile $Temp3_2Path -sync -upgrade -install -skipVerification

#confirm that PrintVis CIM Controller is not empty
#Upgrade to temp tables done
UnPublish-BcContainerApp $instance -name $Temp3Name -version $Temp2Version -unInstall -doNotSaveData
UnPublish-BcContainerApp $instance -name $Temp3Name -version $Temp2_2Version -unInstall -doNotSaveData
UnPublish-BcContainerApp $instance -name $Temp3Name -version $Temp3Version -unInstall -doNotSaveData
UnPublish-BcContainerApp $instance -name $Temp1Name -version $Temp1Version -unInstall -doNotSaveData

Loading
Loading