Base solution for your next web application
Open Closed

Tenant custom field from Phonebook CreatePersonModal.cshtml #3698


User avatar
0
mdonogma created

I've created a custom field for Tenant called TenantCustomRefNumber

I want to access it from the phonebook _CreatePersonModal.cshtml dialog when it opens.

tried :

public async Task<PartialViewResult> CreatePersonModal()
        {
          Task<Tenant> _tenant =  _personAppService.GetTenant();
}

however no customfields are not returned with this object.

guidance please.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Mdonogma,

    Have you added new field to Tenant class ? If so, this is a basic C# use case. If _personAppService.GetTenant returns a Tenant instance, then it must have that field.

    If you followed another way or if I understand you wrongly, can you explain it a bit more detailed ?

    Thanks.

  • User Avatar
    0
    mdonogma created

    that's why i logged an issue , it should be that easy.

    • the tenant instance does not have the custom field.

    try it yourself. add a tenant field then call : Task<Tenant> _tenant = _personAppService.GetTenant();

    you'll see tenant does not have the custom field when returned.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @Mdonogma,

    Can you lastly share your modified Tenant class ? I will try to reproduce this problem.

    Thanks.