Get Table property "TableType"
hello,
to list all table of Business Central we only have AllObj table.
I try to use this table and a Record Ref to count record on all table.
procedure LoadTable();
var
AllObject: Record AllObj;
RecRef: RecordRef;
Counter: Integer;
begin
AllObject.reset;
AllObject.SetRange("Object Type", AllObject."Object Type"::Table);
if AllObject.FindSet(false) then
repeat
RecRef.open(AllObject."Object ID");
Counter := RecRef.Count();
RecRef.Close();
until AllObject.Next() = 0;
end
Some table rise an error because of its property TableType (MicrosoftGraph, CRM...etc).
Table connection for table type MicrosoftGraph must be registered using RegisterTableConnection or cmdlet New-NAVTableConnection before it can be used.
I would like to skip these tables but there isn't any function to get property "TableType" of a table.
thanks in advance for your help
@titofffffff Have a look at "Table Metadata" table.
In a proof of concept I was working on last week, I was able to filter against that table as follows (I too experienced the same issue as you when it encountered tables where table type was CRM, MicrosoftGraph, etc).
TableMetadata.SetRange(TableType, TableMetadata.TableType::Normal);
Thank you @CanuckNav74 issue solved 👍