Hello,
Im studing this module to learn how to deal with tentants.
But I do not see what this code is exactly doing
Can someone explain this to me ?
First, it finds the Tenant record, and changes it's name to the "Public Name" in TenantExtended (after doing some processing to remove characters and formatting not allowed in Tenant.Name). Then if the NameFormat in Tenant Extended has changed, it finds all users in the tenant and updates their names to use the new name format.
J.Ja
Thanks,
I wonder if I really need the name format thing.
And what is the difference between User and MTUsers that you use on the code ?
It's useful for applications that can be used by different cultures, or who have their own organizational way of doing things. If I was making a SaaS B2B product, 100% I would use it. If I was making an internal enterprise tool and I knew it would only be used in one country, I wouldn't use it.
oke, so I can use the User internal tabel provided by Outsystems itself?
You should always have a UserExtended and a TenantExtended table to add onto the internal User and Tenant tables. Their tables don't have nearly all of the fields you will need to manage users and tenants, and having the ability to join to the extended tables to find which users and tenants were created by your app is very important and useful.
I know and I have them.
So I need to use the User and Userextented table to store there the cleaned up name ?
instead of the MTuserTable
It look to me you were using a 1 - 1 where I think I need a 1 - n or am i mistaken ?
A few things to help this be a little more clear:
* These must be 1:1, if they are 1:N it will be a disaster. The last thing you want are duplicates in an Extension Entity. OutSystems naming convention is that anything with "Extended" in the Entity name is an Extension with a 1:1 relationship to what it extends.
* The cleaned up name is in MTUser; UserExtended stores the given name and the family name separately which is how it is able to come up with the properly formatted name to put into MTUser.
* In case you were not aware, MTUser is a very unique Entity; it is the exact same physical table that User is mapped to, but with the tenant id exposed, working in MTUser and User affect the exact same records.
oke,
But with the neo challenge for my feeling a friends can be in several groups.or am I mistaken here?