Validation + UI update when trying to create Quality Inspection Results records with empty fields.#6805
Validation + UI update when trying to create Quality Inspection Results records with empty fields.#6805
Conversation
…at thay can not be empty and the window throws an error if you try to close it/insert one new record/modify an existing record with empty fields.
|
Issue #622623 is not valid. Please make sure you link an issue that exists, is open and is approved. |
|
@microsoft-github-policy-service agree company="Microsoft" |
1 similar comment
|
@microsoft-github-policy-service agree company="Microsoft" |
| if Rec.Code = DefaultResultInProgressCodeLbl then | ||
| Rec."Finish Allowed" := Rec."Finish Allowed"::"Do Not Allow Finish"; | ||
|
|
||
| TestField("Description"); |
There was a problem hiding this comment.
please don't
we already have:
field(2; "Description"; Text[100])
{
Caption = 'Description';
NotBlank = true;
ToolTip = 'Specifies a friendly description for the result.';
}
|
Hi @AndreiPanko if we delete: |
| SourceTable = "Qlty. Inspection Result"; | ||
| SourceTableView = sorting("Evaluation Sequence"); | ||
| PageType = List; | ||
| DelayedInsert = true; |
There was a problem hiding this comment.
is it needed? I would not change this setting.
There was a problem hiding this comment.
DelayedInsert = true; is used because if don't, the error coming from the testField("Description") will be thrown as soon as you click into the description field.
But as said, if you remove testField("Description"), which would make DelayedInsert = true; also not needed, then the application allows the user to create a rec without description.
Therefore DelayedInsert = true; is used here to avoid this error until the user actually try to save the changes; it will trigger then if the description field is empty.

The Code and Description fields now display a red asterisk to indicate that they are mandatory. An error is shown if the window is closed or if a new record is inserted or an existing one modified with empty fields.
Fixes AB#622623