It looks like you're new here. Sign in or register to get started.
MartinFK wrote: Hi, does anybody know how to check the value of the DataPerCompany proberty of a table in C/AL? I am adressing the table via RecRef. Thanks, Martin
OBJECT Codeunit 50000 test { OBJECT-PROPERTIES { Date=28/09/09; Time=18.28.05; Modified=Yes; Version List=; } PROPERTIES { OnRun=BEGIN MESSAGE(FORMAT(IsDataPerCompany(27))); MESSAGE(FORMAT(IsDataPerCompany(2000000004))); END; } CODE { PROCEDURE IsDataPerCompany@1000000000(TableID@1000000000 : Integer) : Boolean; VAR Object@1000000001 : Record 2000000001; BEGIN Object.SETRANGE(Type, Object.Type::TableData); Object.SETRANGE("Company Name", ''); Object.SETRANGE(ID, TableID); EXIT(NOT Object.ISEMPTY); END; BEGIN END. } }
Comments
Bye
Matteo
My Blog - nav.education
Best Regards,
Martin
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog