Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Custom Audit File

Posted on by 185

 
 Hi Everyone,

I was looking at the OOB audit log file and was thinking it would be nice if we store all the details in an entity.  I created an custom entity(Audit) with fields Username,  Date and Number of visitors. Tried to achieve this by JS but not working any suggestion welcome. 

Thanks

Ravi Bachanagiri

*This post is locked for comments

  • ravibachanagiri Profile Picture
    ravibachanagiri 185 on at
    RE: Custom Audit File

    Hi Nadeeja,

    Thanks for the above links which looks informative. Will try this and update you.

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Custom Audit File

    Hi Ravi,

    For that last scenario, you would need code (Plugin or Custom Workflow Activity).

    There's a new feature called Application Insights for this kind of use cases.  Might be just what you are after.

    https://docs.microsoft.com/en-us/azure/application-insights/app-insights-sample-mscrm

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

  • ravibachanagiri Profile Picture
    ravibachanagiri 185 on at
    RE: Custom Audit File

    Hi Nadeeja,

    In my scenario I have thousands of users across the globe. Would like see the users who are accessing some entity in this case lets take it Lead to have better audit. In this way I will have the user name, time and date . Also want to have Auto Clicker just like auto numbering to check the number of user accessing entity each day.

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Custom Audit File

    Hi Ravi,

    In that case you could either use a plugin running on Post-operation or use a Workflow.  You can create a record and use the ModifedOn and ModifiedBy fields of the original record.  

    I am still not clear about number of visitors requirement.  Can you please clarify?  Are you planning to use a single audit record per user and update the count field every time that user access a record?

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

  • ravibachanagiri Profile Picture
    ravibachanagiri 185 on at
    RE: Custom Audit File

    Hi Nadeeja,

    Thanks for the reply. My Aim was to just know the user who was accessing it and when was he and  the number of count. I don't need all the updated fields.

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Custom Audit File

    Hi Ravi,

    I don't recommend using JavaScript for this.  You could use Plugins to achieve this.

    https://msdn.microsoft.com/en-us/library/gg327941.aspx

    1. Create a plugin to run on Pre-operation stage - Here you can create the custom audit record and save all the fields before the change
    2. Create a plugin to run on Post-operation stage - Here you can update the custom audit record and save all the fields after the change

    You can pass the custom audit record ID in a shared variable from pre-operation stage to post-operation stage.

    https://msdn.microsoft.com/en-us/library/gg328579.aspx

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans