Источник:
http://www.axaptapedia.com/Trap_typecast
==============
Summary: caution trap in implicit typecast int64 to boolean
== Typecast from int64(RecId) to boolean ==
(tested in DynamicsAX 2009)
the implicit typecast from int/int64 to boolean is often used in ax sources...
select * from table where table.field == blabla
if (table.recid)
public boolean exist( EDT _value)
{
return (select * from table where table.field == _value).recId;
}
BUT.....
when the RecId (as 64bit integer) last 8 bits are 0
the typecast results in a false even though the RecId is not 0
so, take a look at the bestpractice (design patterns for table exist method)
'''when you'll need a boolean, than use a boolean expression !!!'''
if (table.RecId != 0)
[[category:caution trap]]
Источник:
http://www.axaptapedia.com/Trap_typecast