Change Log, not logging

jbrajbra Member Posts: 32
We are running NAV 4.0 objects on 2009 executables on 2008 SQL server.

We have the change log set to monitor all modifications and deletions to the Item card. For some reason the log is not working. Today I had a user say he had modifified at least 7 unit prices, but none of those changes were logged. The change log has only logged 1 change today and it was made by a diffferent user. ](*,)

I personally changed the Unit price on the item card of an item. The modification did not appear in the change log.
Ideas on why this would happen? How could we troubleshoot the issue?

Thank you for your time.

Answers

  • kinekine Member Posts: 12,562
    Have you restarted your NAV client after you have changed the change log settings?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    edited 2010-04-21
    1. The log will only work, after u restart the client from where u configure the setup (like kine said)
    2. After setup, all other clients must be restart
    3. Are all 3 coloumns in the log activated (Log insert, Log modific, log delete)
    4. What are the values there
    5. is table 27 logged
    6. the change log will only log direct user modifications (user enter some values in a field), and no modification during C/AL code (like a Button which change some fields or some modifications during C/AL). For log C/AL mods, u can read also this: viewtopic.php?f=5&t=25838

    regards
    Do you make it right, it works too!
  • jbrajbra Member Posts: 32
    Here it is Monday morning. Change log setup has not messed with since Friday. Fresh client boot. [-o<

    1.Verified change log settings for Table 27 - Log Insertion: NONE, Log Modification: All Fields, Log Deletion: All fields - looks good
    2. Open Item card, Invoicing tab, manually type new price in the Unit Price field.
    3. Close item card, reopen, verify unit price change was made. (it was)
    4. Open Change log. Last change was logged 3 minutes ago. My change not logged :(
    5. Close and repopen change log. New changes logged (customer table and sales header table) but not my item change.

    Repeated same steps in our test database with the same results.

    Other troubleshooting ideas? ](*,)
  • matttraxmatttrax Member Posts: 2,309
    Have you stepped through the debugger when making the change to see if the correct code is being called?
  • jbrajbra Member Posts: 32
    I am working on stepping through the debugger. There is alot going on back there.

    I will repost when/if I find new information.

    Thank you.
  • jbrajbra Member Posts: 32
    interesting.

    On a whim before I left tonight, I decided to modify the Unit price directly in the Item table (not via the form).

    The change log caught this change. Apparently code on the form is causing the issue.
  • SunsetSunset Member Posts: 201
    Log is reacting to changes between rec and xrec. So you need to find where/why xrec is getting the same value as rec.
    Don't just take my word for it, test it yourself
  • jbrajbra Member Posts: 32
    I found on the Item form, the OnValidate of “unit price” calls

    Unit Price - OnValidate()
    MODIFY(TRUE);

    if I comment out that line the change log works.

    Logic tells me the call to the modify trigger on the item is redundant because the record is being modified thus the Modify record trigger will be already run and that this is breaking the change log b/c when the modify trigger is run the second time rec=xrec. Seem right?

    Now to figure out who put that code there and what problem it was supposed to solve. Ideas on why somemone might do this?
  • jbrajbra Member Posts: 32
    We could not find good documentation and have gone with commenting out this code that is calling the onmodify trigger. Things seem to be working fine, so we will go with it until we find what it broke.
  • ta5ta5 Member Posts: 1,164
    Hi
    My 2 cents on this.
    Imho the log functionality works only if changes are done from gui. Same for rec/xrec story.
    However, in standard NAV there are some batch jobs emulating this behaviour by invoking the log functions explitly by code, for example in outlook sync if I remember correctly.

    This is an excellent document:
    http://www.naviworld.com/document/Navis ... epaper.pdf

    Hope this helps
    Thomas
Sign In or Register to comment.