Change Log Problem...

Angelo
Angelo Member Posts: 180
Hi Master,

I have a problem in Change Log. I have already setup up one table in change log Setup ( Creation,Modification, and Deletion for all fields) but why when I delete record in the table and there is no information in Change Log Entry for deleted record?
Please Advice....

Comments

  • kine
    kine Member Posts: 12,562
    It seems that the record is deleted through some C/AL code. Changes done through C/AL code are not in the change log.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Asallai
    Asallai Member Posts: 142
    Angelo, I think you are using native database. That does not work. I had the same problem, but when I'm changed to SQL that work fine.
  • garak
    garak Member Posts: 3,263
    it works also in Native.
    Do you make it right, it works too!
  • Angelo
    Angelo Member Posts: 180
    I'm using SQL and the problem happened when I cancel reservation. Cancel Reservation means delete Reservation Entry table,right? but why that is not recorded in Change Log Entry?
  • kine
    kine Member Posts: 12,562
    Angelo wrote:
    I'm using SQL and the problem happened when I cancel reservation. Cancel Reservation means delete Reservation Entry table,right? but why that is not recorded in Change Log Entry?

    Not directly. You are not deleting the reservation entry directly. You are running some C/AL which will delete it... and this is the problem... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • idiot
    idiot Member Posts: 651
    For cancellation of Reservation you need to check the custom table that is created specially for this purpose :D
    Check with your manger on this :D
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • garak
    garak Member Posts: 3,263
    kine's right.
    The change log only log manual changes.
    If you need to update the change log also when the record is changed by code, you must create your own function based on the changelog management codeunit (see CU 1) and CU for Changelog.

    take a look at this post

    Regards
    Do you make it right, it works too!
  • Angelo
    Angelo Member Posts: 180
    Can help me how to make additional coding to record Canceled Reservation(Deletion Reservation Entry) in CU 1 (OnGlobalDelete Function)?
  • ayhan06
    ayhan06 Member Posts: 210
    Angelo wrote:
    Can help me how to make additional coding to record Canceled Reservation(Deletion Reservation Entry) in CU 1 (OnGlobalDelete Function)?

    check codeunit 103 "Cust. Entry-Edit".it is called from OnModify trigger of "Customer Ledger Entries" form.
    you should add similar code to the location where reservation entries are deleted.
  • Angelo
    Angelo Member Posts: 180
    thanks guys for all your clues... \:D/