Wednesday 7 March 2012

Result of referencing field with inactive configuration key

Result of referencing field with inactive configuration key, the quick answer are:
  • When used in query criteria, it ignore the criteria in AX and replace with another one in SQL

    From AX: Field1 == ''

    To SQL: 1==1

    From AX: Field1 == 'anyValue'

    To SQL: 1==0

    Empty string converted to 1 and a non-empty string converted to 0
  • When referencing for its value, it just simply returns nothing/empty string
Below is an example of the test:
  1. A configuration key – 'ADeletedConfig' (a disabled key)
  2. A table with 3 fields created, 'Field1' has a configuration key which has been disabled (ADeletedConfig)
  3. Table browser showing the existing records in the table
  4. A job and its execution result

Table field with disabled configuration key


Showing records in table


Demo code


SQL statement from Trace Parser


Result of demo code execution







No comments:

Post a Comment