Skip to content

Validation + UI update when trying to create Quality Inspection Results records with empty fields.#6805

Open
6CRIPT wants to merge 2 commits intomainfrom
bugs/622623-AddRedAsterisToTheDescriptionField
Open

Validation + UI update when trying to create Quality Inspection Results records with empty fields.#6805
6CRIPT wants to merge 2 commits intomainfrom
bugs/622623-AddRedAsterisToTheDescriptionField

Conversation

@6CRIPT
Copy link

@6CRIPT 6CRIPT commented Feb 24, 2026

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

…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.
@6CRIPT 6CRIPT requested a review from a team as a code owner February 24, 2026 07:49
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Feb 24, 2026
@github-actions
Copy link

Issue #622623 is not valid. Please make sure you link an issue that exists, is open and is approved.

@github-actions github-actions bot added this to the Version 29.0 milestone Feb 24, 2026
@6CRIPT
Copy link
Author

6CRIPT commented Feb 24, 2026

@microsoft-github-policy-service agree company="Microsoft"

1 similar comment
@6CRIPT
Copy link
Author

6CRIPT commented Feb 24, 2026

@microsoft-github-policy-service agree company="Microsoft"

if Rec.Code = DefaultResultInProgressCodeLbl then
Rec."Finish Allowed" := Rec."Finish Allowed"::"Do Not Allow Finish";

TestField("Description");
Copy link
Contributor

@AndreiPanko AndreiPanko Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't

we already have:
field(2; "Description"; Text[100])
{
Caption = 'Description';
NotBlank = true;
ToolTip = 'Specifies a friendly description for the result.';
}

@aholstrup1 aholstrup1 closed this Feb 24, 2026
@aholstrup1 aholstrup1 reopened this Feb 24, 2026
@6CRIPT 6CRIPT self-assigned this Feb 25, 2026
@6CRIPT
Copy link
Author

6CRIPT commented Feb 25, 2026

Hi @AndreiPanko if we delete:
TestField("Description");
Then the application allows the user to create a Rec without description
image
despite having NotBlank = True

SourceTable = "Qlty. Inspection Result";
SourceTableView = sorting("Evaluation Sequence");
PageType = List;
DelayedInsert = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it needed? I would not change this setting.

Copy link
Author

@6CRIPT 6CRIPT Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants