web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Custom Audit File

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    6,804 on at

    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

  • ravibachanagiri Profile Picture
    185 on at

    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
    6,804 on at

    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
    185 on at

    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
    6,804 on at

    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
    185 on at

    Hi Nadeeja,

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans