User Information on Entities

Of course.

Thanks a million! :slight_smile:

Is there a way also to track the changes made? Like for example , an end user edited a Price from $100 to $150 , Admins should be able to see who changes , what time which I believe is already solved, and in addition to that admin should be able to see what records where changed per field and what are the values.

I have done many of these audit log services in the past and a simple way to record change data is to have an XML or JSON based post of pre and post data,
i.e. the audit table could be something like below;

Guid Id {get;set;}
DateTime datetime {get;set;}
String Action {get;set;} <-- i.e. this could be the API reference PUT / POST / etc.
String Table {get;set;}
String ReferenceId {get set}
String OriginalUserId {get;set;}
String originalRecord {get;set;} <-- this is a JSON/XML snapshot of the original record
String UpdatingUserId {get;set;}
String UpdatedRecord {get;set;} <-- this is a JSON / XML snapshot of the updated record

what this does is provide a date time of the change, what the change was and who did it.

from there it's up to the system administrators to pull the records apart as required which is typically not a business function.

ideally this would be a simple configurable option to enable / disable in a radzen project, i.e. Enable Audit log? Y / N

For angular, there is a sample project but the changes need to be implemented in the app. radzen-examples/AuditTrail at master ยท radzenhq/radzen-examples ยท GitHub
image

Hi,

I have added the AuditTrail segment as per this post. I am doing this in a Blazor WASM 7.0 project

public IDFContext(DbContextOptions options, SecurityService security) : base(options)
{
this.security = security;
}

but I am getting an error in this section of the SecurityServices.cs
""HttpNavigationManager has not been initialized"

public SecurityService(NavigationManager navigationManager, IHttpClientFactory factory)
{
this.baseUri = new Uri($"{navigationManager.BaseUri}odata/Identity/");
this.httpClient = factory.CreateClient("Idf.Server");
this.navigationManager = navigationManager;
}

Hi @Indesign_Services,

Indeed Blazor WASM requires a different approach as the SecurityService won't work in a controller. You can check this article: Customize CRUD pages | Create a Blazor CRM application with Radzen Blazor Studio | Radzen Blazor Studio