Query Expression Won't Find Negative RecID

I am new to Dynamics AX 2009 and I inherited a project allowing for multiple ship-to addresses for a particular company. I have verified that new alternate addresses are all written to the database fine, but when a grid is supposed to be populated showing these alternate addresses none are displayed for certain companies and the one thing that these companies has in common is that the RecId is a negative number.

For example this query expression retrieves the results fine:

(Address.AddrTableID == 77) && (Address.AddRecID == 32157902)

But the following returns no data even though I have verified that the table has the matching field AddrRecID:

(Address.AddrTableID == 77) && (Address.AddRecID == -1519752193)

If I go into the table, the AddRecID for the record (int64) is showing as -1519752193, but it’s not being picked up. I assume it is some signing issue, but I can’t seem to resolve it.

Any suggestions as to why it can’t match two equal negative numbers?

Just go through this link once:

http://axaptafreak.blogspot.in/2005/08/tip-how-to-renumber-your-recids.html

I have considered this as an option, but I have concerns…

  • The first is, does this really change all instances of the RecID regardless of where it is used and…
  • Won’t the problem just occur again after time. How often should you renumber?

Regardless, I don’t see why the code isn’t working despite it searching for a negative number that does indeed exist.

I will still consider this option, though. Thanks.