Base solution for your next web application
Open Closed

Tenant Specific Text Entries #1763


User avatar
0
gconey created

Hi,

I am creating an application which allows tenants to have their own specific custom fields on certain records (using the EAV pattern). As part of this I'd like to be able to configure tenant specific text entries for labels for these tenant specific fields.

So is it possible to create texts which are specific to a single tenant? i.e. tenant A has a field in the UI which is specific to them and is not used by any other tenant. I'd like them to be able to create a text for the field label and configure the text values for each language for that text. Tenant B has no need for that field or text entry and so shouldn't see it at all.

So I'd like my tenant to be able to configure their own private text entries I don't want to have to put keys and default values for these text entries in the localization XML file as I have no idea what these text entries will be until the tenant configures their specific requirements.

The AbpLanguageText table structure looks like it supports what I want but putting an entry in there which is not in the XML file doesn't seem to work.

Regards, George


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

    Hi,

    You can put a new name-value localization pair to AbpLanguageText table which is not in XML file (I just tested and it's working). But, ABP caches localization texts. Probably this is the problem. If you add it to database while running application, it can not get it. But if you add it by code, it will detect this and refresh the cache automatically.

  • User Avatar
    0
    gconey created

    Hi, Yes caching was the issue. This is perfect and just what I need. Great to find that the Framework already supports my requirements! Thanks a lot.

  • User Avatar
    0
    walkerscott created

    Hi @gconey

    I am interested in how you have implemented your EAV model in ASP.NET Zero. Is there anything that you would be prepared to share in regards to this ?

    We are planning on implementing something similar.

    Thanks