Formatting for XML

  • Post comments:3 Comments

When you have to format C/AL variables (numbers, dates/times, booleans) for exchange with other apps, call FORMAT(variable,0,9) instead of simply FORMAT(variable). The format 9 formats the variable according to XML…

Continue Reading Formatting for XML

Do you have a value, Mr. BLOB?

  • Post comments:7 Comments

To check if a BLOB field has a value, you call its HASVALUE function. For example: IF Item.Picture.HASVALUE THEN; In older versions, earlier than NAV 2009, you had to call…

Continue Reading Do you have a value, Mr. BLOB?

C/AL rollback without error

  • Post comments:4 Comments

If you want to rollback the database changes, but do not want the code execution to end, simply call ASSERTERROR ERROR(''); The ERROR('') will quietly rollback the data changes, and…

Continue Reading C/AL rollback without error

Quick Reporting Tip

  • Post comments:6 Comments

Use Labels (View > Labels) instead of data columns for captions in your reports.  It's amazing how much you save in terms of data transfer. And your Data Set looks…

Continue Reading Quick Reporting Tip