Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to run data editor several times based on boolean flag #40

Merged
merged 1 commit into from
Feb 22, 2025
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
20 changes: 19 additions & 1 deletion Source/Pages/Pag81000.DETDataEditorBuffer.al
Original file line number Diff line number Diff line change
Expand Up @@ -6595,6 +6595,22 @@ page 81000 "DET Data Editor Buffer"
DeleteSourceRecord(Rec."Source Record ID");
end;

trigger OnClosePage()
begin
RunDataEditorBufferList();
end;

local procedure RunDataEditorBufferList()
var
DataEditorPage: Page "DET Data Editor";
begin
if not RunAfter then
exit;

DataEditorPage.SetRunAfter(RunAfter);
DataEditorPage.Run();
end;

local procedure ExportTable()
var
DataEditorMgt: Codeunit "DET Data Editor Mgt.";
Expand Down Expand Up @@ -6786,7 +6802,7 @@ page 81000 "DET Data Editor Buffer"
DataEditorMgt.LogDelete(RecRef.Number(), SourceRecordID, not WithoutValidate);
end;

procedure LoadRecords(TableNo: Integer; inCustomTableView: Text; inFieldFilter: Text; inWithoutValidate: Boolean; inExcludeFlowFields: Boolean; inReadInParallel: Boolean)
procedure LoadRecords(TableNo: Integer; inCustomTableView: Text; inFieldFilter: Text; inWithoutValidate: Boolean; inExcludeFlowFields: Boolean; inReadInParallel: Boolean; inRunAfter: Boolean)
var
DataEditorSetup: Record "DET Data Editor Setup";
begin
Expand All @@ -6798,6 +6814,7 @@ page 81000 "DET Data Editor Buffer"
ReadInParallel := inReadInParallel;
CustomTableView := inCustomTableView;
FieldFilter := inFieldFilter;
RunAfter := inRunAfter;
OpenRecord(TableNo);
InitVisibility();
InitEditable();
Expand Down Expand Up @@ -7964,6 +7981,7 @@ page 81000 "DET Data Editor Buffer"
ExcludeFlowFields: Boolean;
IsLogEnabled: Boolean;
ReadInParallel: Boolean;
RunAfter: Boolean;
IsTestMode: Boolean;
CustomTableView: text;
FieldFilter: text;
Expand Down
22 changes: 20 additions & 2 deletions Source/Pages/Pag81001.DETDataEditor.al
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ page 81001 "DET Data Editor"
SetDirty();
end;
}
field(RunAfter; RunAfter)
{
ApplicationArea = All;
ToolTip = 'Run After';
Caption = 'Run After';
Visible = ShowRunAfter;
}
field(PresetCodeField; PresetCode)
{
ApplicationArea = All;
Expand Down Expand Up @@ -171,8 +178,13 @@ page 81001 "DET Data Editor"
}

trigger OnOpenPage()
var
DataEditorSetup: Record "DET Data Editor Setup";
begin
ExcludeFlowFields := true; //much better for performance

if DataEditorSetup.Get() then
ShowRunAfter := DataEditorSetup."Show Run After";
end;

trigger OnQueryClosePage(CloseAction: Action): Boolean
Expand All @@ -191,7 +203,7 @@ page 81001 "DET Data Editor"
var
DataEditorBufferList: Page "DET Data Editor Buffer";
begin
DataEditorBufferList.LoadRecords(SourceTableNo, CustomTableView, FieldFilter, WithoutValidation, ExcludeFlowFields, ReadInParallel);
DataEditorBufferList.LoadRecords(SourceTableNo, CustomTableView, FieldFilter, WithoutValidation, ExcludeFlowFields, ReadInParallel, RunAfter);
DataEditorBufferList.Run();
end;

Expand Down Expand Up @@ -333,7 +345,6 @@ page 81001 "DET Data Editor"
IsDirty := true;
end;


local procedure SetTableCaption()
var
AllObjWithCaption: Record AllObjWithCaption;
Expand All @@ -342,6 +353,11 @@ page 81001 "DET Data Editor"
SourceTableName := AllObjWithCaption."Object Name";
end;

procedure SetRunAfter(NewRunAfter: Boolean)
begin
RunAfter := NewRunAfter;
end;

var
WithoutValidation: Boolean;
ExcludeFlowFields: Boolean;
Expand All @@ -354,5 +370,7 @@ page 81001 "DET Data Editor"
PresetCode: Code[20];
SavePreset: Boolean;
IsDirty: Boolean;
ShowRunAfter: Boolean;
RunAfter: Boolean;
PresetName: Text;
}
2 changes: 1 addition & 1 deletion Source/Pages/Pag81003.DETRunEditorFromFilter.al
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ page 81003 "DET Run Editor From Filter"
Evaluate(WithoutValidate, Rec.GetFilter("Without Validate"));
if Rec.GetFilter("Exclude FlowFields") <> '' then
Evaluate(ExcludeFlowFields, Rec.GetFilter("Exclude FlowFields"));
DataEditorBufferList.LoadRecords(SourceTableNo, '', '', WithoutValidate, ExcludeFlowFields, false);
DataEditorBufferList.LoadRecords(SourceTableNo, '', '', WithoutValidate, ExcludeFlowFields, false, false);
DataEditorBufferList.Run();
end;
}
4 changes: 4 additions & 0 deletions Source/Pages/Pag81009.DETDataEditorSetup.al
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ page 81009 "DET Data Editor Setup"
{
ToolTip = 'Specify the number of parallel threads to load the data. From 2 to 8.', Comment = '%';
}
field("Show Run After"; Rec."Show Run After")
{
ToolTip = 'Specifies the value of the Show Run After field.', Comment = '%';
}
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions Source/Tables/Tab81004.DETDataEditorSetup.al
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ table 81004 "DET Data Editor Setup"
MaxValue = 8;
InitValue = 6;
}
field(4; "Show Run After"; Boolean)
{
DataClassification = CustomerContent;
Caption = 'Show Run After';
}
}
keys
{
Expand Down
20 changes: 20 additions & 0 deletions Source/Translations/Data Editor Tool.g.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,11 @@
<note from="Developer" annotates="general" priority="2"></note>
<note from="Xliff Generator" annotates="general" priority="3">Table DET Data Editor Setup - Field Primary Key - Property Caption</note>
</trans-unit>
<trans-unit id="Table 4005927189 - Field 3762543834 - Property 2879900210" size-unit="char" translate="yes" xml:space="preserve">
<source>Show Run After</source>
<note from="Developer" annotates="general" priority="2"></note>
<note from="Xliff Generator" annotates="general" priority="3">Table DET Data Editor Setup - Field Show Run After - Property Caption</note>
</trans-unit>
<trans-unit id="Table 1032987457 - Property 2879900210" size-unit="char" translate="yes" xml:space="preserve">
<source>Field</source>
<note from="Developer" annotates="general" priority="2"></note>
Expand Down Expand Up @@ -2383,6 +2388,16 @@
<note from="Developer" annotates="general" priority="2"></note>
<note from="Xliff Generator" annotates="general" priority="3">Page DET Data Editor - Control ReadInParallel - Property Caption</note>
</trans-unit>
<trans-unit id="Page 2312685416 - Control 92693191 - Property 1295455071" size-unit="char" translate="yes" xml:space="preserve">
<source>Run After</source>
<note from="Developer" annotates="general" priority="2"></note>
<note from="Xliff Generator" annotates="general" priority="3">Page DET Data Editor - Control RunAfter - Property ToolTip</note>
</trans-unit>
<trans-unit id="Page 2312685416 - Control 92693191 - Property 2879900210" size-unit="char" translate="yes" xml:space="preserve">
<source>Run After</source>
<note from="Developer" annotates="general" priority="2"></note>
<note from="Xliff Generator" annotates="general" priority="3">Page DET Data Editor - Control RunAfter - Property Caption</note>
</trans-unit>
<trans-unit id="Page 2312685416 - Control 912508298 - Property 1295455071" size-unit="char" translate="yes" xml:space="preserve">
<source>Save Preset</source>
<note from="Developer" annotates="general" priority="2"></note>
Expand Down Expand Up @@ -4668,6 +4683,11 @@
<note from="Developer" annotates="general" priority="2">%</note>
<note from="Xliff Generator" annotates="general" priority="3">Page DET Data Editor Setup - Control Number of Threads - Property ToolTip</note>
</trans-unit>
<trans-unit id="Page 4005927189 - Control 3762543834 - Property 1295455071" size-unit="char" translate="yes" xml:space="preserve">
<source>Specifies the value of the Show Run After field.</source>
<note from="Developer" annotates="general" priority="2">%</note>
<note from="Xliff Generator" annotates="general" priority="3">Page DET Data Editor Setup - Control Show Run After - Property ToolTip</note>
</trans-unit>
<trans-unit id="Page 4005927189 - Action 3696303991 - Property 1295455071" size-unit="char" translate="yes" xml:space="preserve">
<source>Data Editor Log</source>
<note from="Developer" annotates="general" priority="2"></note>
Expand Down
2 changes: 1 addition & 1 deletion Source/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "e28d62da-ceb0-46e7-9e06-774bc46f4bac",
"name": "Data Editor Tool",
"publisher": "Volodymyr Dvernytskyi",
"version": "4.0.0.2",
"version": "4.0.0.3",
"brief": "https://vld-bc.com/",
"description": "https://vld-bc.com/",
"privacyStatement": "https://vld-bc.com/",
Expand Down
Binary file modified Volodymyr Dvernytskyi_Data Editor Tool_Latest.app
Binary file not shown.
Loading