Records with RecId 101090

  • August 4, 2010
  • 2 Comments

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.

  1. Luegisdorf left a comment on August 5, 2010 at 11:34 am

    .. but on the other side this affects cache behaviour and therefore performance and data actuality. So use it wisely 😉

  2. Jeroen Doens left a comment on August 5, 2010 at 12:13 pm

    Indeed, you must always be very careful with caching, this can cause strange side effects..

Comments are closed.