InformedPowerPlatform / MSFTPP.Plugins.CustomAudit

Init
0 stars 0 forks source link

'Create' action not detected and 'Update' action doesn't detect some columns #1

Open clararichela opened 11 months ago

clararichela commented 11 months ago

Hi, I've tried using this plugin to track changes in dataverse tables. However, it doesn't update the Custom Audit view for newly created rows. It works for Updated rows but only for columns where there's already a data before, it doesn't detect if initially that column doesn't have any data (blank).

I've enabled auditing for all the necessary columns, and in the app I've indicated the columns that I want to track. I'm not sure why it's only working partially for Update and not working at all for Create.

Appreciate if you can advise me on this. Also, thank you for the plugin, it's really helpful

InformedPowerPlatform commented 11 months ago

Hi there! Can you go into the model driven app called 'Custom Audit Builder', select 'Edit Existing', and then in the Steps dropdown, do you see a Step for both Update AND Create? Auditing of the Create message is configured separately from the Update message in the plugin.

2023-11-20_08-04-11

clararichela commented 10 months ago

Hi, I've included the Create Step, tried adding a new record in the table, but I still don't have any Create Action in the All Custom Audit table.

Screenshot 2024-01-06 141057 Screenshot 2024-01-06 141121

Additionally, as mentioned before, for Update it shows up in the Custom Audit table only for columns where there's already a data before, it doesn't detect if initially that column doesn't have any data (blank).

Appreciate your help, thank you.

InformedPowerPlatform commented 10 months ago

If you select that create step, what columns are you auditing? Can you give me a screenshot of that?

Perestein commented 4 months ago

Hi, thank you for your solution. I use it to log the changes in my tool that registers visitors of business events at our company.

Unfortunately I run into the same issue as user clararichela. The tool registers updated rows in my table 'Visitor' but not newly created rows. Some screenshots:

image

I've created new visitors in my tool, the table was updated, but the 'create' records are not displaved in the audit tool:

image

What am I doing wrong?

Thanks in advance.

Kind regards, Bas.

InformedPowerPlatform commented 4 months ago

Ok, I have checked and been able to reproduce the error. If you can confirm, please check the system jobs area in your advanced settings to see if you can also see the job failing. I will try to fix this over the weekend.

image

Perestein commented 4 months ago

Hi, I've checked and I get the same job failing:

image

Thanks for trying to fix this.

Gr. Bas

InformedPowerPlatform commented 4 months ago

@clararichela, @Perestein

Should be fixed now. There was an issue when the old or new values were null and needed to be converted to an empty string so they could be logged properly.

NOTE: I also had to rename the plugin assembly as it had a plural name and should not have. This may require that you rebuild your plugin registration steps from scratch for your tables. Sorry for any issues with that, but it could not be helped.

https://github.com/InformedPowerPlatform/MSFTPP.Plugins.CustomAudit/releases/tag/1.0.0.7

Perestein commented 4 months ago

After updating the solution and creating new plugin registration steps initially it looked like it worked but after refreshing the custom audit table I run into 2 issues:

It still does not register new rows in my table. The same job fails when creating a new record.

image

Also the updated records are duplicated in the custom audit table:

image

Does this duplication occur because of the plugin registration steps created in the previous version of the solution?

image

Perhaps a stupid question: how do remove plugin registration steps in the solution?

InformedPowerPlatform commented 4 months ago

Yes, it is most likely because the steps are registered twice. Once with the old one and once with the new one. You'll have to use the Plugin Registration Tool to delete both of them just to be sure, then re-add them back with the new solution.

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/register-plug-in

Perestein commented 4 months ago

I've removed the old steps and created new ones. All looks ok now.

image

Thank you very much.

Gr. Bas