Modify a boolean field in NAV database by TSQL

winderman66winderman66 Member Posts: 11
edited 2015-07-24 in SQL General
Hi guys,

If i change a Boolean field that i have added to the "Sales Invoice Header" with a SQL Script, can something wrong happen ??



  • DenSterDenSter Member Posts: 8,281
    Do you mean changing the data type of the field itself or changing the value of the field? Any changes to the table definition (fields, keys) should never be done on SQL Server but in the table designer in C/SIDE. You can change field values directly on SQL Server, as long as those values are formatted in a way that NAV understands. Code type fields for instance are Varchar fields on SQL Server, and they are all caps. When you insert lower case values, NAV might not understand. The only other thing you need to worry about is null values. NAV does not understand null values, so you need to make sure all field values have values, even if they are blank (null is not the same as an empty string '').
  • lvanvugtlvanvugt Member Posts: 774
    And of course ... changing values through TSQL is not going to execute any business logic related to the field you are changing the value of.
    Luc van Vugt,
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • DenSterDenSter Member Posts: 8,281
    Yes very important Luc, thanks for the reminder :mrgreen:
  • winderman66winderman66 Member Posts: 11
    Yes, its only the values.

    Thanks for the explanation guys, its very appreciated for a NAV beginner like me.
Sign In or Register to comment.