Skip to content

Commit

Permalink
Fix code generator issues with spaces in master entity's name
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
joneug committed Dec 27, 2020
1 parent 2245ab0 commit 3caecfa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MasterExtensions {
begin
if "No." <> xRec."No." then begin
Get«solution.setupTableVariableName»();
NoSeriesMgt.TestManual(«solution.setupTableVariableName»."«master.cleanedName» Nos.");
NoSeriesMgt.TestManual(«solution.setupTableVariableName»."«master.name» Nos.");
"No. Series" := '';
end;
end;
Expand All @@ -89,7 +89,7 @@ class MasterExtensions {
}
field(«management.getNewFieldNo(master)»; Comment; Boolean)
{
CalcFormula = Exist ("Comment Line" where("Table Name" = const(«master.cleanedName»), "No." = field("No.")));
CalcFormula = Exist ("Comment Line" where("Table Name" = const(«master.name.saveQuote»), "No." = field("No.")));
Caption = 'Comment';
Editable = false;
FieldClass = FlowField;
Expand Down Expand Up @@ -117,7 +117,7 @@ class MasterExtensions {
begin
if "No." = '' then begin
Test«master.cleanedName»NoSeries();
NoSeriesMgt.InitSeries(«solution.setupTableVariableName»."«master.cleanedName» Nos.", xRec."No. Series", 0D, "No.", "No. Series");
NoSeriesMgt.InitSeries(«solution.setupTableVariableName»."«master.name» Nos.", xRec."No. Series", 0D, "No.", "No. Series");
end;

«IF master.hasTemplateOfType(TemplateDimensions
Expand All @@ -136,7 +136,7 @@ class MasterExtensions {
DimMgt.DeleteDefaultDim(Database::"«master.tableName»", "No.");

«ENDIF»
CommentLine.SetRange("Table Name", CommentLine."Table Name"::«master.cleanedName»);
CommentLine.SetRange("Table Name", CommentLine."Table Name"::«master.name.saveQuote»);
CommentLine.SetRange("No.", "No.");
CommentLine.DeleteAll();

Expand Down Expand Up @@ -177,7 +177,7 @@ class MasterExtensions {
with «master.tableVariableName» do begin
«master.tableVariableName» := Rec;
Test«master.cleanedName»NoSeries();
if NoSeriesMgt.SelectSeries(«solution.setupTableVariableName»."«master.cleanedName» Nos.", Old«master.tableVariableName»."No. Series", "No. Series") then begin
if NoSeriesMgt.SelectSeries(«solution.setupTableVariableName»."«master.name» Nos.", Old«master.tableVariableName»."No. Series", "No. Series") then begin
Test«master.cleanedName»NoSeries();
NoSeriesMgt.SetSeries("No.");
Rec := «master.tableVariableName»;
Expand Down Expand Up @@ -229,7 +229,7 @@ class MasterExtensions {
local procedure Test«master.cleanedName»NoSeries()
begin
Get«solution.setupTableVariableName»();
«solution.setupTableVariableName».TestField("«master.cleanedName» Nos.");
«solution.setupTableVariableName».TestField("«master.name» Nos.");
end;

procedure TestBlocked()
Expand Down Expand Up @@ -378,7 +378,7 @@ class MasterExtensions {
Promoted = true;
PromotedCategory = Category6;
RunObject = Page "Comment Sheet";
RunPageLink = "Table Name" = const(«master.cleanedName»),
RunPageLink = "Table Name" = const(«master.name.saveQuote»),
"No." = field("No.");
ToolTip = 'View or add comments for the record.';
}
Expand Down Expand Up @@ -478,7 +478,7 @@ class MasterExtensions {
Promoted = true;
PromotedCategory = Category4;
RunObject = Page "Comment Sheet";
RunPageLink = "Table Name" = const(«master.cleanedName»),
RunPageLink = "Table Name" = const(«master.name.saveQuote»),
"No." = field("No.");
ToolTip = 'View or add comments for the record.';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class SolutionExtensions {
{
Caption = 'Primary Key';
}
field(2; "«solution.master.cleanedName» Nos."; Code[20])
field(2; "«solution.master.name» Nos."; Code[20])
{
Caption = '«solution.master.cleanedName» Nos.';
TableRelation = "No. Series";
Expand Down Expand Up @@ -247,7 +247,7 @@ class SolutionExtensions {
static def doGenerateCommentLineTableNameEnumExt(Solution solution) '''
enumextension «management.newEnumExtNo» «solution.commentLineTableNameEnumExtName.saveQuote» extends "Comment Line Table Name"
{
value(50000; "«solution.master.cleanedName»") { }
value(50000; «solution.master.name.saveQuote») { }
}
'''
Expand All @@ -262,7 +262,7 @@ class SolutionExtensions {
{
modify("No.")
{
TableRelation = if ("Table Name" = const(«solution.master.name»)) «solution.master.tableName.saveQuote»;
TableRelation = if ("Table Name" = const(«solution.master.name.saveQuote»)) «solution.master.tableName.saveQuote»;
}
}
}
Expand Down

0 comments on commit 3caecfa

Please sign in to comment.