简体   繁体   English

如何检查recref.field(Integer)是否为空或Navision Development(C / ALL)中是否存在?

[英]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是数据类型RecRef ,通过该我访问表,可以选择该表的字段;

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

but if this is empty navision send error so; 但是如果这是空的navision发送错误,那么;

How to check if RecRef.field(Integer) is empty or exists in Navision Development ( C/ALL )? 如何检查RecRef.field(Integer)是否为空或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 https://msdn.microsoft.com/zh-CN/library/dd301354(v=nav.90).aspx

You may also reference fields using RecRef.FIELDINDEX(i), where i is between 1 and RecRef.FIELDCOUNT. 您还可以使用RecRef.FIELDINDEX(i)引用字段,其中i在1和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 我还建议您查看Codeunits 423 Change Log Management8617 Config. Validate Management 8617 Config. Validate Management for advanced examples and scenarios of working with RecordRefs and FieldRefs. 8617 Config. Validate Management以了解使用RecordRefs和FieldRefs的高级示例和方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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