Skip to content

Commit 8c1e30e

Browse files
authored
[Quality Management] - Extensibility and Public APIs (#6402)
<!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary <!-- Provide a general summary of your changes --> Made public procedures internal #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes [AB#610916](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/610916)
1 parent bbe4685 commit 8c1e30e

18 files changed

Lines changed: 78 additions & 78 deletions

src/Apps/W1/Quality Management/app/src/AccessControl/QltyPermissionMgmt.Codeunit.al

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ codeunit 20406 "Qlty. Permission Mgmt."
228228
/// </summary>
229229
/// <param name="ShouldPrompt">Only set with interaction ability is available ( GuiAllowed() is true ) and also prompt when possible is chosen.</param>
230230
/// <returns>Whether or not auto-assignment should occur.</returns>
231-
procedure GetShouldAutoAssign(var ShouldPrompt: Boolean) ShouldAssign: Boolean
231+
internal procedure GetShouldAutoAssign(var ShouldPrompt: Boolean) ShouldAssign: Boolean
232232
var
233233
QltyInspectionHeader: Record "Qlty. Inspection Header";
234234
begin
@@ -248,7 +248,7 @@ codeunit 20406 "Qlty. Permission Mgmt."
248248
/// </summary>
249249
/// <param name="FunctionalPermission"></param>
250250
/// <returns></returns>
251-
procedure GetSuggestedAllowedValueForFunction(FunctionalPermission: Text) Result: Boolean
251+
internal procedure GetSuggestedAllowedValueForFunction(FunctionalPermission: Text) Result: Boolean
252252
begin
253253
case FunctionalPermission of
254254
GetCaptionCreateInspectionAuto():
@@ -359,7 +359,7 @@ codeunit 20406 "Qlty. Permission Mgmt."
359359
/// If they can, nothing happens.
360360
/// If they cannot then an error will be thrown.
361361
/// </summary>
362-
procedure VerifyCanEditLineComments()
362+
internal procedure VerifyCanEditLineComments()
363363
begin
364364
if not CanEditLineComments() then
365365
Error(UserDoesNotHavePermissionToErr, CurrentUserId, GetCaptionEditLineComments());
@@ -378,7 +378,7 @@ codeunit 20406 "Qlty. Permission Mgmt."
378378
/// CanReadLineComments. True if the user can read or write line comments.
379379
/// </summary>
380380
/// <returns>Return value of type Boolean.</returns>
381-
procedure CanReadLineComments(): Boolean
381+
internal procedure CanReadLineComments(): Boolean
382382
begin
383383
exit(LoadPermissionDetails(GetCaptionEditLineComments()));
384384
end;

src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/JobQueue/QltyJobQueueManagement.Codeunit.al

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ codeunit 20455 "Qlty. Job Queue Management"
5050
/// Common usage: Called when setting up inspection generation rules to ensure scheduled execution infrastructure exists.
5151
/// </summary>
5252
/// <param name="ScheduleGroup">The schedule group code to check and potentially create a job queue entry for</param>
53-
procedure PromptCreateJobQueueEntryIfMissing(ScheduleGroup: Code[20])
53+
internal procedure PromptCreateJobQueueEntryIfMissing(ScheduleGroup: Code[20])
5454
begin
5555
if IsJobQueueCreated(ScheduleGroup) then
5656
exit;
@@ -80,7 +80,7 @@ codeunit 20455 "Qlty. Job Queue Management"
8080
/// Common usage: When users want multiple schedules for the same rule group (e.g., hourly and daily runs).
8181
/// </summary>
8282
/// <param name="ScheduleGroup">The schedule group code to create a job queue entry for (defaults to 'QM' if empty)</param>
83-
procedure PromptCreateJobQueueEntry(ScheduleGroup: Code[20])
83+
internal procedure PromptCreateJobQueueEntry(ScheduleGroup: Code[20])
8484
begin
8585
if ScheduleGroup = '' then
8686
ScheduleGroup := DefaultScheduleGroupTok;
@@ -113,7 +113,7 @@ codeunit 20455 "Qlty. Job Queue Management"
113113
/// </summary>
114114
/// <param name="ToExcludeQltyInspectionGenRule">The rule to exclude from the check (typically the rule being deleted or modified)</param>
115115
/// <param name="ScheduleGroupToConsiderRemoving">The schedule group code whose job queue entries should be considered for removal</param>
116-
procedure DeleteJobQueueIfNothingElseIsUsingThisGroup(ToExcludeQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule"; ScheduleGroupToConsiderRemoving: Code[20])
116+
internal procedure DeleteJobQueueIfNothingElseIsUsingThisGroup(ToExcludeQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule"; ScheduleGroupToConsiderRemoving: Code[20])
117117
var
118118
QltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule";
119119
JobQueueEntry: Record "Job Queue Entry";
@@ -151,7 +151,7 @@ codeunit 20455 "Qlty. Job Queue Management"
151151
/// report with filters matching the specified schedule group.
152152
/// </summary>
153153
/// <param name="ScheduleGroup">The schedule group code to filter job queue entries by</param>
154-
procedure RunPageLookupJobQueueEntriesForScheduleGroup(ScheduleGroup: Code[20])
154+
internal procedure RunPageLookupJobQueueEntriesForScheduleGroup(ScheduleGroup: Code[20])
155155
var
156156
JobQueueEntry: Record "Job Queue Entry";
157157
begin
@@ -261,7 +261,7 @@ codeunit 20455 "Qlty. Job Queue Management"
261261
/// Error thrown: FilterMandatoryErr with schedule group in message
262262
/// </summary>
263263
/// <param name="ThisQltyInspectionGenRule">The inspection generation rule to validate for scheduling</param>
264-
procedure CheckIfGenerationRuleCanBeScheduled(var ThisQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule")
264+
internal procedure CheckIfGenerationRuleCanBeScheduled(var ThisQltyInspectionGenRule: Record "Qlty. Inspection Gen. Rule")
265265
begin
266266
if (ThisQltyInspectionGenRule."Condition Filter" = '') and (ThisQltyInspectionGenRule."Item Filter" = '') and (ThisQltyInspectionGenRule."Item Attribute Filter" = '') then
267267
Error(FilterMandatoryErr, ThisQltyInspectionGenRule."Schedule Group");

src/Apps/W1/Quality Management/app/src/Configuration/GenerationRule/QltyInspectionGenRule.Table.al

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ table 20404 "Qlty. Inspection Gen. Rule"
404404
/// <summary>
405405
/// Sets the default automatic inspection creation triggers for generation rules based on the values set in Quality Management Setup
406406
/// </summary>
407-
procedure SetIntentAndDefaultTriggerValuesFromSetup()
407+
internal procedure SetIntentAndDefaultTriggerValuesFromSetup()
408408
var
409409
QltyManagementSetup: Record "Qlty. Management Setup";
410410
InferredIntent: Enum "Qlty. Gen. Rule Intent";
@@ -473,7 +473,7 @@ table 20404 "Qlty. Inspection Gen. Rule"
473473
end;
474474

475475
[TryFunction]
476-
procedure TryInferGenerationRuleIntent(var QltyGenRuleIntent: Enum "Qlty. Gen. Rule Intent"; var QltyCertainty: Enum "Qlty. Certainty")
476+
internal procedure TryInferGenerationRuleIntent(var QltyGenRuleIntent: Enum "Qlty. Gen. Rule Intent"; var QltyCertainty: Enum "Qlty. Certainty")
477477
begin
478478
InferGenerationRuleIntent(QltyGenRuleIntent, QltyCertainty);
479479
end;

src/Apps/W1/Quality Management/app/src/Configuration/Result/QltyInspectionResult.Table.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ table 20411 "Qlty. Inspection Result"
252252
UpdateExistingConditions();
253253
end;
254254

255-
procedure AutoSetResultCategoryFromName()
255+
internal procedure AutoSetResultCategoryFromName()
256256
begin
257257
if Rec."Result Category" <> Rec."Result Category"::Uncategorized then
258258
exit;

src/Apps/W1/Quality Management/app/src/Configuration/Result/QltyResultConditionMgmt.Codeunit.al

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ codeunit 20409 "Qlty. Result Condition Mgmt."
8282
/// <param name="Template">The template</param>
8383
/// <param name="LineNo">The template line</param>
8484
/// <param name="OptionalSpecificResult">Leave empty to copy all applicable results</param>
85-
procedure CopyResultConditionsFromTestToTemplateLine(Template: Code[20]; LineNo: Integer; OptionalSpecificResult: Code[20]; OverwriteConditionIfExisting: Boolean)
85+
internal procedure CopyResultConditionsFromTestToTemplateLine(Template: Code[20]; LineNo: Integer; OptionalSpecificResult: Code[20]; OverwriteConditionIfExisting: Boolean)
8686
begin
8787
CopyResultConditionsFromTestToTemplateLine(Template, LineNo, OptionalSpecificResult, OverwriteConditionIfExisting, '', '');
8888
end;
@@ -437,7 +437,7 @@ codeunit 20409 "Qlty. Result Condition Mgmt."
437437
/// <param name="MatrixArrayToSetConditionDescriptionCellData"></param>
438438
/// <param name="MatrixArrayToSetCaptionSet"></param>
439439
/// <param name="MatrixVisibleStateToSet"></param>
440-
procedure GetDefaultPromotedResults(
440+
internal procedure GetDefaultPromotedResults(
441441
AllPromoted: Boolean;
442442
var MatrixArraySourceRecordId: array[10] of RecordId;
443443
var MatrixArrayToSetConditionCellData: array[10] of Text;

src/Apps/W1/Quality Management/app/src/Configuration/Result/QltyResultEvaluation.Codeunit.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ codeunit 20410 "Qlty. Result Evaluation"
157157
/// <param name="OptionalQltyInspectionHeader"></param>
158158
/// <returns></returns>
159159
[TryFunction]
160-
procedure TryValidateQltyInspectionLine(var QltyInspectionLine: Record "Qlty. Inspection Line"; var OptionalQltyInspectionHeader: Record "Qlty. Inspection Header")
160+
internal procedure TryValidateQltyInspectionLine(var QltyInspectionLine: Record "Qlty. Inspection Line"; var OptionalQltyInspectionHeader: Record "Qlty. Inspection Header")
161161
begin
162162
ValidateQltyInspectionLine(QltyInspectionLine, OptionalQltyInspectionHeader, false);
163163
end;

src/Apps/W1/Quality Management/app/src/Configuration/SourceConfiguration/QltyTraversal.Codeunit.al

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ codeunit 20408 "Qlty. Traversal"
593593
/// <param name="ChildRecordVariant">The child record as a Record, RecordId, or RecordRef</param>
594594
/// <param name="FoundParentRecordRef">Output: The resolved parent RecordRef if found</param>
595595
/// <returns>True if a single parent record was found; False otherwise</returns>
596-
procedure FindSingleParentRecordWithVariant(ChildRecordVariant: Variant; var FoundParentRecordRef: RecordRef): Boolean;
596+
internal procedure FindSingleParentRecordWithVariant(ChildRecordVariant: Variant; var FoundParentRecordRef: RecordRef): Boolean;
597597
var
598598
ChildRecordRef: RecordRef;
599599
begin
@@ -760,7 +760,7 @@ codeunit 20408 "Qlty. Traversal"
760760
/// <param name="Item">Output: The found Item record with all fields populated</param>
761761
/// <param name="CurrentVariant">The record variant to search (Record, RecordRef, or RecordId)</param>
762762
/// <returns>True if an Item was found and loaded into Item; False otherwise</returns>
763-
procedure FindRelatedItemIn(var Item: Record Item; CurrentVariant: Variant): Boolean
763+
internal procedure FindRelatedItemIn(var Item: Record Item; CurrentVariant: Variant): Boolean
764764
var
765765
QltyInspectSourceConfig: Record "Qlty. Inspect. Source Config.";
766766
QltyInspectSrcFldConf: Record "Qlty. Inspect. Src. Fld. Conf.";
@@ -870,7 +870,7 @@ codeunit 20408 "Qlty. Traversal"
870870
/// <param name="Vendor">Output: The found Vendor record with all fields populated</param>
871871
/// <param name="CurrentVariant">The record variant to search (Record, RecordRef, or RecordId)</param>
872872
/// <returns>True if a Vendor was found and loaded into Vendor; False otherwise</returns>
873-
procedure FindRelatedVendorIn(var Vendor: Record Vendor; CurrentVariant: Variant): Boolean
873+
internal procedure FindRelatedVendorIn(var Vendor: Record Vendor; CurrentVariant: Variant): Boolean
874874
var
875875
RecordRef: RecordRef;
876876
VendorNo: Text;
@@ -949,7 +949,7 @@ codeunit 20408 "Qlty. Traversal"
949949
/// <param name="Customer">Output: The found Customer record with all fields populated</param>
950950
/// <param name="CurrentVariant">The record variant to search (Record, RecordRef, or RecordId)</param>
951951
/// <returns>True if a Customer was found and loaded into Customer; False otherwise</returns>
952-
procedure FindRelatedCustomerIn(var Customer: Record Customer; CurrentVariant: Variant): Boolean
952+
internal procedure FindRelatedCustomerIn(var Customer: Record Customer; CurrentVariant: Variant): Boolean
953953
var
954954
RecordRef: RecordRef;
955955
CustomerNo: Text;
@@ -1028,7 +1028,7 @@ codeunit 20408 "Qlty. Traversal"
10281028
/// <param name="RoutingHeader">Output: The found Routing Header record with all fields populated</param>
10291029
/// <param name="CurrentVariant">The record variant to search (Record, RecordRef, or RecordId)</param>
10301030
/// <returns>True if a Routing Header was found and loaded into RoutingHeader; False otherwise</returns>
1031-
procedure FindRelatedRoutingIn(var RoutingHeader: Record "Routing Header"; CurrentVariant: Variant): Boolean
1031+
internal procedure FindRelatedRoutingIn(var RoutingHeader: Record "Routing Header"; CurrentVariant: Variant): Boolean
10321032
var
10331033
RecordRef: RecordRef;
10341034
RoutingNo: Text;
@@ -1111,7 +1111,7 @@ codeunit 20408 "Qlty. Traversal"
11111111
/// <param name="ProductionBOMHeader">Output: The found Production BOM Header record with all fields populated</param>
11121112
/// <param name="CurrentVariant">The record variant to search (Record, RecordRef, or RecordId)</param>
11131113
/// <returns>True if a Production BOM Header was found and loaded into ProductionBOMHeader; False otherwise</returns>
1114-
procedure FindRelatedBillOfMaterialIn(var ProductionBOMHeader: Record "Production BOM Header"; CurrentVariant: Variant): Boolean
1114+
internal procedure FindRelatedBillOfMaterialIn(var ProductionBOMHeader: Record "Production BOM Header"; CurrentVariant: Variant): Boolean
11151115
var
11161116
CurrentField: Record Field;
11171117
QltyInspectSourceConfig: Record "Qlty. Inspect. Source Config.";

src/Apps/W1/Quality Management/app/src/Document/QltyInspectionCreate.Codeunit.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ codeunit 20404 "Qlty. Inspection - Create"
775775
/// Returns the last created status.
776776
/// </summary>
777777
/// <returns></returns>
778-
procedure GetLastCreatedStatus(): Enum "Qlty. Inspection Create Status"
778+
internal procedure GetLastCreatedStatus(): Enum "Qlty. Inspection Create Status"
779779
begin
780780
exit(LastQltyInspectionCreateStatus);
781781
end;

src/Apps/W1/Quality Management/app/src/Document/QltyInspectionHeader.Table.al

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ table 20405 "Qlty. Inspection Header"
771771
/// <summary>
772772
/// InitInspectionNumber will initialize the document no. on the Quality Inspection if it's needed. If it's already set then this will not be altered.
773773
/// </summary>
774-
procedure InitInspectionNumber()
774+
internal procedure InitInspectionNumber()
775775
var
776776
NoSeries: Codeunit "No. Series";
777777
begin
@@ -788,7 +788,7 @@ table 20405 "Qlty. Inspection Header"
788788
/// Decision decision: because we're passing this around as a recordref everywhere and we need that flag, we're storing in the session state instead.
789789
/// </summary>
790790
/// <param name="IsCreating"></param>
791-
procedure SetIsCreating(IsCreating: Boolean)
791+
internal procedure SetIsCreating(IsCreating: Boolean)
792792
begin
793793
QltySessionHelper.SetSessionValue(GetIsCreatingKey(), Format(IsCreating));
794794
end;
@@ -797,7 +797,7 @@ table 20405 "Qlty. Inspection Header"
797797
/// Returns true if this record is in the middle of being created.
798798
/// </summary>
799799
/// <returns></returns>
800-
procedure GetIsCreating(): Boolean
800+
internal procedure GetIsCreating(): Boolean
801801
begin
802802
exit(QltySessionHelper.GetSessionValue(GetIsCreatingKey()) = Format(true));
803803
end;
@@ -957,7 +957,7 @@ table 20405 "Qlty. Inspection Header"
957957
/// Returns the posted inventory for the item/variant
958958
/// </summary>
959959
/// <returns></returns>
960-
procedure GetPostedInventory() PostedInventory: Decimal
960+
internal procedure GetPostedInventory() PostedInventory: Decimal
961961
var
962962
ItemLedgerEntry: Record "Item Ledger Entry";
963963
TempItemTrackingSetup: Record "Item Tracking Setup" temporary;
@@ -980,7 +980,7 @@ table 20405 "Qlty. Inspection Header"
980980
PostedInventory := ItemLedgerEntry.Quantity;
981981
end;
982982

983-
procedure GetReservedInventory() ReservedInventory: Decimal
983+
internal procedure GetReservedInventory() ReservedInventory: Decimal
984984
var
985985
ReservationEntry: Record "Reservation Entry";
986986
TempItemTrackingSetup: Record "Item Tracking Setup" temporary;
@@ -1032,7 +1032,7 @@ table 20405 "Qlty. Inspection Header"
10321032
/// Returns true if there is a more recent re-inspection than the current inspection.
10331033
/// </summary>
10341034
/// <returns></returns>
1035-
procedure HasMoreRecentReinspection(): Boolean
1035+
internal procedure HasMoreRecentReinspection(): Boolean
10361036
var
10371037
SucceedingQltyInspectionHeader: Record "Qlty. Inspection Header";
10381038
begin
@@ -1317,7 +1317,7 @@ table 20405 "Qlty. Inspection Header"
13171317
/// <param name="FileExtension"></param>
13181318
/// <returns></returns>
13191319
[TryFunction]
1320-
procedure AddPicture(var PictureInStream: InStream; PictureName: Text; FileExtension: Text)
1320+
internal procedure AddPicture(var PictureInStream: InStream; PictureName: Text; FileExtension: Text)
13211321
var
13221322
DocumentAttachment: Record "Document Attachment";
13231323

@@ -1410,29 +1410,29 @@ table 20405 "Qlty. Inspection Header"
14101410
OnAfterSetRecordFiltersToFindInspectionFor(Rec, ErrorIfMissingFilter, RecordVariant, UseItem, UseTracking, UseDocument);
14111411
end;
14121412

1413-
procedure GetMostRecentInspectionFor(RecordVariant: Variant) Success: Boolean
1413+
internal procedure GetMostRecentInspectionFor(RecordVariant: Variant) Success: Boolean
14141414
begin
14151415
Rec.SetRecordFiltersToFindInspectionFor(false, RecordVariant, true, true, true);
14161416
Rec.SetCurrentKey("No.", "Re-inspection No.");
14171417
Rec.Ascending(false);
14181418
Success := Rec.FindFirst();
14191419
end;
14201420

1421-
procedure PrintCertificateOfAnalysis()
1421+
internal procedure PrintCertificateOfAnalysis()
14221422
var
14231423
QltyReportMgmt: Codeunit "Qlty. Report Mgmt.";
14241424
begin
14251425
QltyReportMgmt.PrintCertificateOfAnalysis(Rec);
14261426
end;
14271427

1428-
procedure PrintNonConformance()
1428+
internal procedure PrintNonConformance()
14291429
var
14301430
QltyReportMgmt: Codeunit "Qlty. Report Mgmt.";
14311431
begin
14321432
QltyReportMgmt.PrintNonConformance(Rec);
14331433
end;
14341434

1435-
procedure PrintGeneralPurposeInspection()
1435+
internal procedure PrintGeneralPurposeInspection()
14361436
var
14371437
QltyReportMgmt: Codeunit "Qlty. Report Mgmt.";
14381438
begin
@@ -1505,7 +1505,7 @@ table 20405 "Qlty. Inspection Header"
15051505
/// Use SetPreventAutoAssignment to set whether or not we should prevent auto-assignment for this inspection
15061506
/// </summary>
15071507
/// <param name="ShouldPrevent"></param>
1508-
procedure SetPreventAutoAssignment(ShouldPrevent: Boolean)
1508+
internal procedure SetPreventAutoAssignment(ShouldPrevent: Boolean)
15091509
begin
15101510
QltySessionHelper.SetSessionValue(GetPreventAutoAssignmentKey(), Format(ShouldPrevent));
15111511
end;
@@ -1596,7 +1596,7 @@ table 20405 "Qlty. Inspection Header"
15961596
///If no sampling fields, will return the sample size if all measures are acceptable.
15971597
/// </summary>
15981598
/// <returns>Quantity of samples</returns>
1599-
procedure GetPassSampleQuantity() PassQuantity: Decimal
1599+
internal procedure GetPassSampleQuantity() PassQuantity: Decimal
16001600
begin
16011601
end;
16021602

@@ -1605,14 +1605,14 @@ table 20405 "Qlty. Inspection Header"
16051605
///If no sampling fields, will return the sample size if any measures are not acceptable.
16061606
/// </summary>
16071607
/// <returns>Quantity of samples</returns>
1608-
procedure GetFailedSampleQuantity() FailQuantity: Decimal
1608+
internal procedure GetFailedSampleQuantity() FailQuantity: Decimal
16091609
begin
16101610
end;
16111611

16121612
/// <summary>
16131613
/// Initializes the Qlty. Related Transfers page with the Quality Inspection record and runs it
16141614
/// </summary>
1615-
procedure RunModalRelatedTransfers()
1615+
internal procedure RunModalRelatedTransfers()
16161616
var
16171617
QltyRelatedTransferOrders: Page "Qlty. Related Transfer Orders";
16181618
begin

0 commit comments

Comments
 (0)