Yes "store the id of the currently logged in user in the users table when creating a new record"
Thats what I want to do, when a dealer creates a salesperson, but that id goes into the FH_ID.
The overall user system I`m building is for a product catalog with a later possibility for making sales competitions between dealerships og between all salepersons.
The UserGroupID is for acces to the different areas
FH_ID and SA_ID is usefull, for query different kinds of rapports and statistics.
We also have a design_type_ID which is for different themes, since the dealerships belong to different dealer chains . This way the theme (after login) will change to whatever colors and logo that dealer belongs to. (This gets set by the admin on dearler creation)
could you give me an example on how a trigger would look like to activate insert of a dealer !
DealerID = 2