Replies: 4 comments 6 replies
-
The setup table is indeed tricky. Maybe if the primay key field is not used on pages either? Or not used at all? |
Beta Was this translation helpful? Give feedback.
-
After thinking some time about this, I will not handle setup tables. There might be exclusions even for them. If we will have a clear rule for those kind of setup tables, I will change this check. |
Beta Was this translation helpful? Give feedback.
-
This got released as new rule. #89 If you encounter any issues, please open an issue |
Beta Was this translation helpful? Give feedback.
-
Thinking a bit further about this rule, it does not apply for master data / documents adopting the 'No. Series' pattern. If you would set the NotBlank e.g. on the No. field in the Customer table, the insert will fail ... ... since the NotBlank is evaluated before the OnInsert trigger (containing fallback code to fetch the No. via No. Series) This rule will result in a lot of false positives (adding a pragma on all of those seems a bit overkill ?) if you'd run it on the Base App. |
Beta Was this translation helpful? Give feedback.
-
In the past we often faced issues on master / referential data tables having a blank value as Primary Key value. When the user detected the blank value and performed a rename, suddenly all fields with a TableRelation to this parent table got - wrongfully - updated.
Since then, we apply a rule to ensure the Primary Key value of a table must be filled, by setting the NotBlank = true property on the PK field.
It would be nice if we could have a rule to check tables:
IMPORTANT : This rule will however conflict with the Singleton pattern and should thus exclude 'Setup' tables (without having to explicitly set a pragma):
Beta Was this translation helpful? Give feedback.
All reactions