简体   繁体   中英

How to check recref.field(Integer) is empty or exists in Navision Development ( C/ALL )?

RecRef is datatype of RecRef , and by this i access to table and can select the field of the table;

RecRef.OPEN(IDTABLE);
RecRef.field(2); // RETURN THE FIELD DATA OF THE IDTABLE.

but if this is empty navision send error so;

How to check if RecRef.field(Integer) is empty or exists in Navision Development ( C/ALL )?

Thanks in advance,

You may use virtual table Field to check which field numbers exist in a table, as well as their data types and other properties.

https://msdn.microsoft.com/en-us/library/dd301354(v=nav.90).aspx

You may also reference fields using RecRef.FIELDINDEX(i), where i is between 1 and RecRef.FIELDCOUNT. By this you do not need to guess field numbers if you do not know them.

I would also advise to look at Codeunits 423 Change Log Management and 8617 Config. Validate Management 8617 Config. Validate Management for advanced examples and scenarios of working with RecordRefs and FieldRefs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM