Hi
We are using latest Asp.Net Core MVC with jQuery.
For one of our entities we need to allow host admin to select Tenant. We added Pick Control.
But when we save data with TenantId it stores CreatorUserId as Null and in update LastModifierUserId as Null. We have used using (UnitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant)) { await CreateOrEditData(input); }
How we can fix this?
3 Answer(s)
-
0
Hi @razkhan78
If entity belongs to a Tenant, you can't set CreatorUserId to a host user. Would you like to do that ?
-
0
Entity is having IMayHaveTenat.
We want our super admin/host admin to create some records for tenant. So yes entity belongs to Tenant but can be managed by Host Admin. And so if Host Admin made any change or created it for tenant, we need to know the correct UserId.
-
0
Hi,
I suggest you to create a new table for this and store it on Host side. For example table can be like this;
- CreatorUserId
- ModifierUserId
- RecordId
- TenantId
If you want to show this on a UI, you can also add a "Description" field. Note that, this entity shouldn't implement IMayHaveTenant interface.