Skip to content

Commit

Permalink
Merge pull request Bertverbeek4PS#1 from mprise-indigo/main_84695_Add…
Browse files Browse the repository at this point in the history
…MaximumLengthProperty

Introduce MaximumLength properties on Attribute within common data model
  • Loading branch information
acjdekorte authored Feb 13, 2024
2 parents df580c4 + 6a98d6d commit e1a591a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions businessCentral/app/src/CDMUtil.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,13 @@ codeunit 82566 "ADLSE CDM Util" // Refer Common Data Model https://docs.microsof
ADLSEUtil.GetDataLakeCompliantFieldName(FieldRef.Name, FieldRef.Number),
DataFormat,
FieldRef.Name,
AppliedTraits));
AppliedTraits,
FieldRef.Length));
end;
if ADLSEUtil.IsTablePerCompany(TableID) then begin
GetCDMAttributeDetails(FieldType::Text, DataFormat, AppliedTraits);
Result.Add(
CreateAttributeJson(GetCompanyFieldName(), DataFormat, GetCompanyFieldName(), AppliedTraits));
CreateAttributeJson(GetCompanyFieldName(), DataFormat, GetCompanyFieldName(), AppliedTraits, FieldRef.Length));
end;
end;

Expand All @@ -142,12 +143,13 @@ codeunit 82566 "ADLSE CDM Util" // Refer Common Data Model https://docs.microsof
exit(CompanyFieldNameLbl);
end;

local procedure CreateAttributeJson(Name: Text; DataFormat: Text; DisplayName: Text; AppliedTraits: JsonArray) Attribute: JsonObject
local procedure CreateAttributeJson(Name: Text; DataFormat: Text; DisplayName: Text; AppliedTraits: JsonArray; MaximumLength: Integer) Attribute: JsonObject
begin
Attribute.Add('name', Name);
Attribute.Add('dataFormat', DataFormat);
Attribute.Add('appliedTraits', AppliedTraits);
Attribute.Add('displayName', DisplayName);
Attribute.Add('maximumLength', MaximumLength);
end;

procedure CheckChangeInEntities(EntityContentOld: JsonObject; EntityContentNew: JsonObject; EntityName: Text)
Expand Down

0 comments on commit e1a591a

Please sign in to comment.