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

Community site session details

Session Id : joU7eFufzXoYqGTYAnlusK
Power Apps - Microsoft Dataverse
Answered

Showing Audit History of each fields in Custom Entities in Canvas App Screens

Like (0) ShareShare
ReportReport
Posted on 23 Jun 2021 12:24:54 by

Hi All,

Could somebody tell me the step by step process of capturing Dataverse Entities Audit History with Field changes and displaying it in canvas app screen in the best optimized way?

 

P.S. : Audit History needs to capture Who changed, and When the field value got changed and this Audit History needs to be displayed in Canvas App Screen.

 

Thanks & Regards,

Shubh

I have the same question (0)
  • Drew Poggemann Profile Picture
    9,283 Most Valuable Professional on 23 Jun 2021 at 16:06:42
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    Hi @Anonymous ,

     

    Please see the following post that just addressed this...

    https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Track-Changes-of-Microsoft-Dataverse-entity-and-shown-in/m-p/959561#M12121

     

    Hopefully this helps!  Please accept if answers your question or Like if helps in any way.


    Thanks,


    Drew

  • EricRegnier Profile Picture
    8,716 Most Valuable Professional on 26 Jun 2021 at 21:33:35
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    Hi @Anonymous,

    The steps by steps process of enabling audit history is here: https://docs.microsoft.com/power-platform/admin/enable-use-comprehensive-auditing#enable-auditing 

    The steps by steps to view those audit records within a canvas app depending on how and what you want to display, but in short. Pick the table "Audits" in the Dataverse connector and bind the Audits table to a gallery which you can then pick the columns you want to display and search (e.g "Changed By", Changed Date", etc). More info on the Audit table: https://docs.microsoft.com/dynamics365/customer-engagement/web-api/audit?view=dynamics-ce-odata-9 

    Hope this helps!

     

  • Community Power Platform Member Profile Picture
    on 28 Jun 2021 at 18:30:27
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    @EricRegnier : Thanks for the response. I got the Audits table in Dataverse connector, I have enabled auditing. Will we be able to filter it to show auditing for a particular record in an table or audit history of a particular table?

  • EricRegnier Profile Picture
    8,716 Most Valuable Professional on 28 Jun 2021 at 20:07:40
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    You won’t see it directly in Dataverse or in Maker portal (make.powerapps.com). You can only see it via the Dataverse connector, Web API or SDK. If you want to access audits in Dataverse, go to the Admin Center -> pick your environment -> settings -> Auditing

    hope this clarifies 

  • Community Power Platform Member Profile Picture
    on 28 Jun 2021 at 20:20:47
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    @EricRegnier : I got the Audits table through Data Connector but my question is how can I filter the Entitiy which I am interested in and also to show Old Data and New Data with the field changed.I see only the following properties after binding Audits with the Gallery:

    1.ThisItem.'Changed Field'

    2. ThisItem.'User Info'

    3. ThisItem.'Calling User'

    4. ThisItem.'Changed By'

    5. ThisItem.'Changed Date'

    6. ThisItem.Event

    7. ThisItem.IsSelected

    8. ThisItem.Operation

    9. ThisItem.'Record Id'

    10. ThisItem.'Transaction Id'

     

    I need the following:

    'Entity Name'  'Field Name' 'Changed By' 'Changed Date' 'Old Value' 'New Value'

     

    Thanks & Regards,

    Shubh

  • Verified answer
    EricRegnier Profile Picture
    8,716 Most Valuable Professional on 29 Jun 2021 at 06:23:12
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    You can filter on "Record Id" with the current entity/table record/row ID (guid). That will give you the changes for that entity, then ThisItem.'Changed Field', ThisItem.'Changed By', ThisItem.'Changed Date' are self-explanatory. The only items missing are Old and New Value, which is a little more tricky to get. You'll need to perform an API call to retrieve those details. The query is something like this:

    https://<org>.api.crm<num>.dynamics.com/api/data/v9.2/RetrieveRecordChangeHistory(Target=@Target)?@Target={<entityid>:
    "<guid>","@odata.type":"Microsoft.Dynamics.CRM.<entityname>"}

    Where entityid is the ID physical field name (e.g. accountid) and entityname is the physical entity name (e.g. account).

    To access those Dataverse API functionalities, you'll need to create a custom connector. More info: https://powerapps.microsoft.com/blog/register-and-use-custom-apis-in-powerapps/ 

     

    Another way is to have a hyperlink directly to the out-of-the-box audit history page for access the details: the format of the URL is:

    https://<org>.crm<num>.dynamics.com/userdefined/areas.aspx?oId=<guid>&oType=1&rof=true&security=852023&tabSet=areaAudit

    Where oId is he entity record/row ID.

    Hope this helps!

  • Community Power Platform Member Profile Picture
    on 29 Jun 2021 at 09:42:38
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    Thank you!!!

  • Ronak83garg Profile Picture
    115 on 01 Aug 2022 at 12:25:30
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    Hi @EricRegnier,

     

    Thanks a lot for sharing the details.

     

    We are trying to redirect the user to the audit history page of the record directly by following the inputs you suggested but it redirects us to another web page which does not give audit history about that particular record.

     

    Another way is to have a hyperlink directly to the out-of-the-box audit history page for access the details: the format of the URL is:

    https://<org>.crm<num>.dynamics.com/userdefined/areas.aspx?oId=<guid>&oType=1&rof=true&security=852023&tabSet=areaAudit

    Where oId is he entity record/row ID.

     

    oId - we are setting this as the unique id of the record in the DataVerse Table. 

    Can you please suggest if we are missing anything ?

     

    Thanks in advance.

     

    Best Regards,

    Ronak Garg

     

     

     

  • Ronak83garg Profile Picture
    115 on 01 Aug 2022 at 12:26:42
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    Hi,

     

    Did you managed to redirect the user directly to the out-of-the-box audit history page for access the details ?

    If yes, please provide your inputs.

     

    Thanks in advance.

     

    Best Regards,

    Ronak Garg

  • Ronak83garg Profile Picture
    115 on 01 Aug 2022 at 12:40:41
    Re: Showing Audit History of each fields in Custom Entities in Canvas App Screens

    Hi,

     

    Please ignore above post, as I managed to made it work.

    Thanks @EricRegnier for your post.

     

    Br,

    Ronak Garg

     

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 686 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 433 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 266 Moderator

Last 30 days Overall leaderboard

Featured topics

Loading complete