cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Billy_C
Helper V
Helper V

one to many and many to many relations are not audited

Hi there,

 

I have been looking around how to implement audit logs, and I have read in the documentation that it is possible to measure relations as well, both one to many and many to many. Now I have been trying to measure such relations, but it seems that it isn't possible to measure this, unless I am doing something wrong or the documentation is not correct/deprecated?

I know that you can enable audit on fields, but this is just for the N:1 relations. When you have a project you can view the audit logs on the invoice but not on the list of orders from the project perspective since invoice is an N:1 (lookup field) but orders is a 1:N relation.

 

I thought this was possible because under the Supported for Audit header: "Audit of relationships (1:N, N:N)" is included.

So far, I have found zero references on how to enable Audit logs for 1:N and N:N.

 

So can someone please tell me how to enable this or if this is no longer possible?

 

Thanks in advance!

 

Billy Cottrell

1 ACCEPTED SOLUTION

Accepted Solutions
dpoggemann
Super User
Super User

Hi @Billy_C ,

 

As mentioned by @rampprakash you will be able to see the lookup field on the N side in the audit if you have that lookup field audited but you would not be able to see on the "1" side that a new record was included as part of the audit.

 

If you have a need to track this type of auditing in the N:N world, you might want to manually create the intersect table in the middle of this relationship so you have the ability to turn on auditing of the two lookup fields on this intersect entity to track changes.

 

Example, if you have an N:N relationship for entities A and B you could create a table in-between so you have 

A --> AB <-- B

where AB would have lookups to A and B and you would audit these fields on the AB table.

 

Hope this helps in some way.  Please accept if answers your question or Like if helps in any way.


Thanks,

 

Drew

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

View solution in original post

4 REPLIES 4
rampprakash
Memorable Member
Memorable Member

Hello @Billy_C,

 

We cannot Audit N:N relation.

 

If you want to log the Relation for 1:N, add the respective lookup in the form to make it Auditing. Make sure you will enable Audit for lookup field to track the same.

 

Let me know if you need more clarity.

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

 

Billy_C
Helper V
Helper V

Hi @rampprakash,

 

I see, so I can assume that 1:N relations won't work either then, since the lookup fields reside in the related entity (N side).

 

In that case, the following documentation on this is deprecated and should be updated correspondingly, as it gives a wrong impression of the possibilities of this feature.

 

Billy_C_0-1637840943372.png

 

Thanks in advance,

 

Billy Cottrell

dpoggemann
Super User
Super User

Hi @Billy_C ,

 

As mentioned by @rampprakash you will be able to see the lookup field on the N side in the audit if you have that lookup field audited but you would not be able to see on the "1" side that a new record was included as part of the audit.

 

If you have a need to track this type of auditing in the N:N world, you might want to manually create the intersect table in the middle of this relationship so you have the ability to turn on auditing of the two lookup fields on this intersect entity to track changes.

 

Example, if you have an N:N relationship for entities A and B you could create a table in-between so you have 

A --> AB <-- B

where AB would have lookups to A and B and you would audit these fields on the AB table.

 

Hope this helps in some way.  Please accept if answers your question or Like if helps in any way.


Thanks,

 

Drew

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

View solution in original post

Fubar
Solution Sage
Solution Sage

Technically they are audited, you just cannot see it against the Records themselves (except as previously mentioned by others if it is a 1:N and you view the Child record and can see the lookup field change). 

 

You need to go to Settings->Auditing->Audit Summary View and look for the "Association" events Associate Entities and Disassociate Entities.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,773)