Editing non-editable field

northernernortherner Member Posts: 67
Hi I have a strange problem. A field on a setup table is occasionally changing for no apparent reason, and this causes operational problems. First of all we turned on change log to see which user it was - however, even though it was correctly set up, nothing was recorded when the data was updated. Next we made the field non-editable on the form so that users couldn't modify it - but that didn't stop it from being modified. Next I made it non-editable on the table, and added some code in the OnValidate trigger to throw an error if it was changed, but that also didn't stop the data from changing. Most recently, I've loaded the database objects into the developers toolkit and used the Where Used function to look for code that changes the value, however there isn't any. The version is NAV 2009 SP1 on SQL 2008 (classic client only). There are no SQL jobs to update data (only backups and maintenance tasks), and the customer says they have no ODBC links from any other application. Short of hard-coding the value into C/AL code, which is an awful thing to do, I'm at a loss how to stop the value from changing. Does anybody have any ideas...?

Comments

  • SavatageSavatage Member Posts: 7,142
    You've made it non-editable on the table & form, yet it still is being changed?
    Next I made it non-editable on the table, and added some code in the OnValidate trigger to throw an error if it was changed
    

    So it looks like it's bypassing the validate. Someone is obviously running some modify report or dataport or direct changes thru sql or something. I would keep digging. Personally I wouldn't be able to sleep knowing changes to the system are being made in a way that can't be found.


    How about create another field that holds the same value as this "changing field" somewhere in a setup table.
    OnModify
    if "new field" <> "changing field" then error('GOTCHA!');
Sign In or Register to comment.