Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

which class or method used to insert Database log in Ax 2012 ?

(0) ShareShare
ReportReport
Posted on by 321

I want to know which class or method used to insert the Database log and when the fire to complete the operation.

exactly want to why and how ax save updated fields only in container in x++ and convert that container to nvarbinary in SQL server

to simulate the module in the MVC project

  • Abdelrhman Hiba Profile Picture
    Abdelrhman Hiba 321 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    hi all,

    I would like to thank you all for your interaction in solving my problem,

    I understood it completely and all your answer is 100% correct.

    hot regardes

  • Verified answer
    WillWU Profile Picture
    WillWU 22,352 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    Hi Abdelrhman Hiba,

    As mentioned above, please check the setData() method in the table sysDatabaselog.

    Dynamics Ax 2012 provide the functionality to log insert update and delete functionality on table as well as selected filed of a table. When tracking on any table in dynamics Ax, a new entry will be created in sysDatabaselog table.

    Please see:

    docs.microsoft.com/.../configure-and-manage-database-logging

    Hope this helps.

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    Hi,

    The data field is being assigned in this call - 

    sysDataBaseLog.LogMap::setData(recordInserted);

  • Martin Dráb Profile Picture
    Martin Dráb 231,309 Most Valuable Professional on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    You don't see sysDataBaseLog.setData() inside logInsert()? It's there in D365FO and I assume it's the same in AX 2012 as well. The Data field is  set inside setData() method.

    Update: according to the other reply, the implementation in AX 2012 is slightly different.

    By the way, you could have simply look at cross-references for this field.

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    hi,

    You can find the piece of code in the logInsert menthod of application class.

    sysDataBaseLog.LogMap::setData(recordUpdated, recordOrig, changedFields);

    This is the place where data field value is set.

    Uday

  • Abdelrhman Hiba Profile Picture
    Abdelrhman Hiba 321 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    hi Nikolaos,

    thanks for your replay, and I am found the class and the methods,

    But I still can't find the part that I wanted to confirm which was it in SysDataBaseLog have a filed called 'Data' it's not found in LogInsert method to assign data, Either place, you think it might assign data to that field?

    thanks

  • Verified answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    As mentioned, "Application is the class" where you can find those methods.

    So check the class called Application.

  • Abdelrhman Hiba Profile Picture
    Abdelrhman Hiba 321 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    Hello,

    Thanks for the replay, but I don't understand what you mean:

    1. LogInsert

    2.LogUpdate

    3. Record deleted

    Are the classes or methods?

  • Verified answer
    udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: which class or method used to insert Database log in Ax 2012 ?

    hi,

    Application is the class where you can find,

    1. LogInsert

    2.LogUpdate

    3.Logdelete

    Uday

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans