Base solution for your next web application
Open Closed

OrganizationUnit Change Sample Code #12035


User avatar
0
ayoyusuf created

Angular + .Net Core

Version: 13.1

Please do you have any complete sample code implementation for best practice for a user being able to change/switch between organization units. Our attempts over several months have not been successful as the need to persist the session of the organizationunitid has been a challenge. (Yes, we have tried the customized sessions but still struggled with this.). We would appreciate any version of complete working sample. (usual what we see are short code concepts that don't easily translate to fully working solution)


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

    Hi,

    I have two questions.

    1. Did you follow https://aspnetboilerplate.com/Pages/Documents/Articles%5CHow-To%5Cadd-custom-session-field-aspnet-core
    2. And also you want logged in user to switch the organization unit ?
  • User Avatar
    0
    ayoyusuf created

    Hi,

    I have two questions.

    1. Did you follow https://aspnetboilerplate.com/Pages/Documents/Articles%5CHow-To%5Cadd-custom-session-field-aspnet-core
    2. And also you want logged in user to switch the organization unit ?
    1. Yes, we followed it and we were unable to get it to work. Maybe we just couldn't implement it correctly. Hence why We requested for a full working sample in which it was implemented rather than just a code snippet.

    2. We are flexible with how the Organization Unit switch is done. Logged in user or at login. We just want to be able to switch and by able to at any point (in API and front end), know which Organization unit is active.

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi ayoyusuf,

    You can stay tuned to the relevant issue at https://github.com/aspnetzero/aspnet-zero-core/issues/5225 for a blog post explaining how to switch between organization units and how to permanently store the organization unit in the session.