In the table browser of table SecuritySubRole when I add a record and assign values to ValidFrom and ValidTo fields for some reason after saving it and reopening the table the values are emptied (set to null value of DateTime type).
Also, if I just drag a role to subrole node in AOT the newly inserted record in SecuritySubRole table has empty ValidFrom and ValidTo fields.
What is the proper way to add a sub role to a role? Is there any way to fill the ValidFrom and ValidTo values? If not, then what’s their purpose? Aren’t the records with empty ValidFrom and ValidTo fields not valid?
Maybe if you tell me the proper way to add a subrole to a role from client side I’ll find a way to fill the fields. I couldn’t do it from “Assign users to roles” form, I could only add privileges and duties to roles.
Modifying the table doesn’t write the object to AOT. Please don’t meddle with system objects; you may break something.
What are you trying to achieve by filling these fields?
I’m trying to test my Query. Thanks for your concern, but I’m modifying records in the test environment.
The questions in my first post remain about finding a proper way to add a subrole to a role.
You said that you already know the proper way. It seems that you you just don’t want to use it…
I said that if I drag a role to subrole node the record gets created but ValidFrom and ValidTo fields are empty. So I thought that it wasn’t a proper way. Also, the fact that it is available only from AOT made me think that there would be a way to do it from client side (or maybe my assumption was just wrong and this action can only be performed by System Admins).
Do you confirm that there is no way to create a record in SecuritySubRole table with non-empty values in ValidFrom and ValidTo fields?
Let me repeat my question once more: What are you trying to achieve by filling ValidFrom and ValidTo fields?
I want to query only the valid records from the table. Correct me if I’m wrong but as far as I understand the record which has empty values in these fields should be considered as not valid. I’m trying to figure out what conditions to write in my query (if anything) to fetch the correct (valid) records from SecuritySubRole table. If the case is that these fields are always empty then I don’t need to add any ranges to my query. If it turns out that there is a way to create a record in this table with non-empty dateTime fields then I need to have the ranges in my query. I hope I made myself clear this time.
Please test your assumption. Then you’ll either turn your assumption to a fact, you’ll find that your assumption is false and you’re just wasting time. I don’t know by heart how AX fills and uses every single field, therefore I would have to perform the same test.
I believe that sub-roles can also be added on the Security roles form.