Records with RecId 101090
I was using the postload method of the HRMBenefitType-table to fill the description-field with language-sensitive description (from LanguageTxt). This works fine when I view the record, but not when I use a lookup.
I’ve put a break-point on my postload method and noticed the recId (this.recid of the HRMBenefitType table). This is always the 101090. When I check this in the tablebrowser, this does not match the actual RecId valule.
I checked the SQL-trace-log and noticed the following instruction:
SELECT A.HRMBENEFITTYPEID,A.DESCRIPTION,A.RECVERSION,101090 FROM HRMBENEFITTYPE A WHERE (DATAAREAID=?) ORDER BY A.DATAAREAID,A.HRMBENEFITTYPEID OPTION(FAST 1)
The solution to this problem is simple. Just change the CacheLookup property to EntireTable and the strange behaviour of the RecId-field stops.
Tags: Ax 4.0, Ax 5.0 (2009), Dynamics AX, Programming, Tips & Tricks, X++
This entry was posted on Wednesday, August 4th, 2010 at 06:00 and is filed under Dynamics AX. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


August 5th, 2010 at 11:34
.. but on the other side this affects cache behaviour and therefore performance and data actuality. So use it wisely
August 5th, 2010 at 12:13
Indeed, you must always be very careful with caching, this can cause strange side effects..