These are events available for codeunit 23067635 IWX QI Hooks.

Parameters

Name Value
Description Hooks for quality inspection events.

Methods

OnTestCreated

This action will occur when a new Quality Inspection Test has been created. This is exposed with ExternalBusinessEvent and intended to be used in PowerAutomate.

procedure OnTestCreated(pguidTestID: Guid, pcodTestNo: Code[20], pguidSourceRecordID: Guid, pcodSourceDocumentNo: Code[20], pcodSourceItemNo: Code[20], pcodSourceVariantCode: Code[10], pcodSourceLotNo: Code[50], pcodSourceSerialNo: Code[50], pcodGradeCode: Code[20])

Parameters

Name Type Description
pguidTestID Guid The system record ID of the newly created test.
pcodTestNo Code The test document no.
pguidSourceRecordID Guid The source record id of the record that triggered the test.
pcodSourceDocumentNo Code The source document no.
pcodSourceItemNo Code The source item no.
pcodSourceVariantCode Code The source variant code.
pcodSourceLotNo Code The source lot number.
pcodSourceSerialNo Code The source serial number.
pcodGradeCode Code The current grade of the test.

OnTestFinished

This action will occur when a Quality Inspection Test has changed to the finished state. This is exposed with ExternalBusinessEvent and intended to be used in PowerAutomate.

procedure OnTestFinished(pguidTestID: Guid, pcodTestNo: Code[20], pguidSourceRecordID: Guid, pcodSourceDocumentNo: Code[20], pcodSourceItemNo: Code[20], pcodSourceVariantCode: Code[10], pcodSourceLotNo: Code[50], pcodSourceSerialNo: Code[50], pcodGradeCode: Code[20])

Parameters

Name Type Description
pguidTestID Guid The system ID of the quality inspection test.
pcodTestNo Code The quality inspection test no.
pguidSourceRecordID Guid The system ID of the source record.
pcodSourceDocumentNo Code The source document no. from the test.
pcodSourceItemNo Code The source item no. associated with the test.
pcodSourceVariantCode Code If variants are used then the source variant on the test.
pcodSourceLotNo Code The lot number associated with the test.
pcodSourceSerialNo Code The serial number associated with the test.
pcodGradeCode Code The current grade of the test.

OnTestReOpened

This action will occur when a Quality Inspection Test has been re-opened. This is exposed with ExternalBusinessEvent and intended to be used in PowerAutomate.

procedure OnTestReOpened(pguidTestID: Guid, pcodTestNo: Code[20], pguidSourceRecordID: Guid, pcodSourceDocumentNo: Code[20], pcodSourceItemNo: Code[20], pcodSourceVariantCode: Code[10], pcodSourceLotNo: Code[50], pcodSourceSerialNo: Code[50], pcodGradeCode: Code[20])

Parameters

Name Type Description
pguidTestID Guid The system ID of the quality inspection test.
pcodTestNo Code The quality inspection test no.
pguidSourceRecordID Guid The system ID of the source record.
pcodSourceDocumentNo Code The source document no. from the test.
pcodSourceItemNo Code The source item no. associated with the test.
pcodSourceVariantCode Code If variants are used then the source variant on the test.
pcodSourceLotNo Code The lot number associated with the test.
pcodSourceSerialNo Code The serial number associated with the test.
pcodGradeCode Code The current grade of the test.

OnTestChanged

This action will occur when a Quality Inspection Test has changed. This is exposed with ExternalBusinessEvent and intended to be used in PowerAutomate.

procedure OnTestChanged(pguidTestID: Guid, pcodTestNo: Code[20], pguidSourceRecordID: Guid, pcodSourceDocumentNo: Code[20], pcodSourceItemNo: Code[20], pcodSourceVariantCode: Code[10], pcodSourceLotNo: Code[50], pcodSourceSerialNo: Code[50], pcodGradeCode: Code[20])

Parameters

Name Type Description
pguidTestID Guid The system ID of the quality inspection test
pcodTestNo Code The quality inspection test no.
pguidSourceRecordID Guid The system ID of the source record
pcodSourceDocumentNo Code The source document no. from the test
pcodSourceItemNo Code The source item no. associated with the test
pcodSourceVariantCode Code If variants are used then the source variant on the test
pcodSourceLotNo Code The lot number associated with the test
pcodSourceSerialNo Code The serial number associated with the test
pcodGradeCode Code The current grade of the test

Events

OnBeforeCreateTest

OnBeforeCreateTest is called before a test is created. Use this event to do additional checks before a test is created.

[IntegrationEvent(False,False)]
procedure OnBeforeCreateTest(var prrefTargetRecordRef: RecordRef, var pbIsManualCreation: Boolean, var pcodOptionalspecificTemplate: Code[20], var pbIsHandled: Boolean, var pvarOptionalRec2Variant: Variant, var pvarOptionalRec3Variant: Variant)

Parameters

Name Type Description
prrefTargetRecordRef RecordRef The main target record that the test will be created against.
pbIsManualCreation Boolean True when the test is being manually created and not automatically triggered.
pcodOptionalspecificTemplate Code When supplied refers to a specific desired template.
pbIsHandled Boolean Set to true to replace the default behavior, set to false to extend it and continue.
pvarOptionalRec2Variant Variant For complex automation can be additional source records.
pvarOptionalRec3Variant Variant For complex automation can be additional source records.

OnAfterCreateTestBeforeDialog

OnAfterCreateTestBeforeDialog gets called after a Quality Inspection Test has been created and before any interactive dialog is shown.

[IntegrationEvent(False,False)]
procedure OnAfterCreateTestBeforeDialog(var prrefTargetRecordRef: RecordRef, var prrefTriggeringRecordRef: RecordRef, var pbIsManualCreation: Boolean, var pcodOptionalspecificTemplate: Code[20], var ptrecGenerationRule: Record "IWX QI Generation Rule" temporary, var precQualityInspectionTest: Record "IWX QI Test", var pbIsHandled: Boolean, var pvarOptionalRec2Variant: Variant, var pvarOptionalRec3Variant: Variant)

Parameters

Name Type Description
prrefTargetRecordRef RecordRef The main target record that the test will be created against.
prrefTriggeringRecordRef RecordRef Typically the same as the target record ref. Used in complex customizations.
pbIsManualCreation Boolean True when the test is being manually created and not automatically triggered.
pcodOptionalspecificTemplate Code When supplied refers to a specific desired template.
ptrecGenerationRule IWX QI Generation Rule The generation rule that helped determine which template to use.
precQualityInspectionTest IWX QI Test The quality inspection test.
pbIsHandled Boolean Set to true to replace the default behavior, set to false to extend it and continue.
pvarOptionalRec2Variant Variant For complex automation can be additional source records.
pvarOptionalRec3Variant Variant For complex automation can be additional source records.

OnAfterCreateTestAfterDialog

OnAfterCreateTestAfterDialog gets called after a Quality Inspection Test has been created after any interactive dialog is shown.

[IntegrationEvent(False,False)]
procedure OnAfterCreateTestAfterDialog(var prrefTargetRecordRef: RecordRef, var prrefTriggeringRecordRef: RecordRef, var pbIsManualCreation: Boolean, var pcodOptionalspecificTemplate: Code[20], var ptrecGenerationRule: Record "IWX QI Generation Rule" temporary, var precQualityInspectionTest: Record "IWX QI Test", var pvarOptionalRec2Variant: Variant, var pvarOptionalRec3Variant: Variant)

Parameters

Name Type Description
prrefTargetRecordRef RecordRef The main target record that the test will be created against
prrefTriggeringRecordRef RecordRef Typically the same as the target record ref. Used in complex customizations.
pbIsManualCreation Boolean True when the test is being manually created and not automatically triggered
pcodOptionalspecificTemplate Code When supplied refers to a specific desired template
ptrecGenerationRule IWX QI Generation Rule The generation rule that helped determine which template to use.
precQualityInspectionTest IWX QI Test The quality inspection test
pvarOptionalRec2Variant Variant For complex automation can be additional source records
pvarOptionalRec3Variant Variant For complex automation can be additional source records

OnCustomCreateTestBehavior

Implement OnCustomCreateTestBehavior if you have also extended enum 23067637 “IWX QI Create Test Behavior” This is where you will provide any custom create test behaviors to match your enum extension. Only set handled to true if you want to skip the remaining behavior.

[IntegrationEvent(False,False)]
procedure OnCustomCreateTestBehavior(var prrefTargetRecordRef: RecordRef, var prrefOriginalTriggeringRecordRef: RecordRef, var ptrecGenerationRule: Record "IWX QI Generation Rule" temporary, var pbHasExistingTest: Boolean, var precExistingTest: Record "IWX QI Test", var pbOutNeedNewTest: Boolean, var pbOutCreateRetest: Boolean)

Parameters

Name Type Description
prrefTargetRecordRef RecordRef The record the test is being created against.
prrefOriginalTriggeringRecordRef RecordRef The record that triggered the test.
ptrecGenerationRule IWX QI Generation Rule The generation rule.
pbHasExistingTest Boolean Whether it has an existing test.
precExistingTest IWX QI Test Optionally an existing test that matches.
pbOutNeedNewTest Boolean Choose whether it should need a new test.
pbOutCreateRetest Boolean Choose whether it should create a Retest.

OnSetCustomMatchExistingFilters

Implement OnSetCustomMatchExistingFilters is you have extended enum 23067638 “IWX QI Find Existing Behavior” Use this to determine what filters to set for any custom behavior. This would typically be just calling SetcurrentKey. SetRecFilter() will be called after setting this. Only set the handled flag to true if you want to skip the remaining behavior.

[IntegrationEvent(False,False)]
procedure OnSetCustomMatchExistingFilters(prrefTargetRecordRef: RecordRef, ptrecGenerationRule: Record "IWX QI Generation Rule" temporary, var precOutExistingQualityInspectionTest: Record "IWX QI Test", var pbHandled: Boolean)

Parameters

Name Type Description
prrefTargetRecordRef RecordRef The main target record that the test will be created against.
ptrecGenerationRule IWX QI Generation Rule The generation rule that helped determine which template to use.
precOutExistingQualityInspectionTest IWX QI Test The main target record that the test will be created against.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeGetUserPermissionRecord

Use OnBeforeGetUserPermissionRecord to override which user permission record is used when checking permissions.

[IntegrationEvent(False,False)]
procedure OnBeforeGetUserPermissionRecord(var ptxtUserId: Text, var precUserPermission: Record "IWX QI Permission", var rbOut: Boolean, var pbHandled: Boolean)

Parameters

Name Type Description
ptxtUserId Text Input is the UserId() of the active session.
precUserPermission IWX QI Permission Supply if setting rbOut to be true.
rbOut Boolean True if found, false if not found.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterGetUserPermissionRecord

Use OnAfterGetUserPermissionRecord to extend which user permission record is used when checking permissions. This is called after the everyone check has performed.

[IntegrationEvent(False,False)]
procedure OnAfterGetUserPermissionRecord(var ptxtUserId: Text, var precUserPermission: Record "IWX QI Permission", var rbOut: Boolean)

Parameters

Name Type Description
ptxtUserId Text Input is the UserId() of the active session.
precUserPermission IWX QI Permission It’s possible this is not a user specific permission; this could be a permission representing multiple people.
rbOut Boolean True if found; false if not found

OnValidatePermissionUserId

Only available in Business Central 15 and newer. Use OnValidatePermissionUserId as an opportunity to validate the user ID in a user permission record. You could use this if you have extended “IWX QI User Type”. You can also use this to change the user reference if you have other ‘user’ records that you want to allow to other user-related tables.

[IntegrationEvent(False,False)]
procedure OnValidatePermissionUserId(var precUserPermission: Record "IWX QI Permission", var pbHandled: Boolean)

Parameters

Name Type Description
precUserPermission IWX QI Permission The user permission record.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeCreateRetest

OnBeforeCreateRetest supplies an opportunity to change how manual Retests are performed.

[IntegrationEvent(False,False)]

procedure OnBeforeCreateRetest(var precFromThisTest: Record “IWX QI Test”, var precOutCreatedRetest: Record “IWX QI Test”, var pbHandled: Boolean)

Parameters

Name Type Description
precFromThisTest IWX QI Test Which test the retest is being requested to be created from.
precOutCreatedRetest IWX QI Test If you are setting pbHandled to true, you must supply a valid retest record here.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterCreateRetest

OnAfterCreateRetest gives an opportunity to integrate with the retest record after a manual retest is created.

[IntegrationEvent(False,False)]
procedure OnAfterCreateRetest(var precFromThisTest: Record "IWX QI Test", var precOutCreatedRetest: Record "IWX QI Test")

Parameters

Name Type Description
precFromThisTest IWX QI Test Which test the retest is being requested to be created from
precOutCreatedRetest IWX QI Test The created retest

OnBeforeReOpenTest

OnBeforeReOpenTest is called before a test is Reopened.

[IntegrationEvent(False,False)]
procedure OnBeforeReOpenTest(var precTest: Record "IWX QI Test", var pbHandled: Boolean)

Parameters

Name Type Description
precTest IWX QI Test The quality inspection test involved.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeFinishTest

OnBeforeFinishTest is called before a test is finished.

[IntegrationEvent(False,False)]
procedure OnBeforeFinishTest(var precTest: Record "IWX QI Test", var pbHandled: Boolean)

Parameters

Name Type Description
precTest IWX QI Test The quality inspection test involved.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeProductionAttemptCreatePostAutomaticTest

Name Type Description
precProdOrderRoutingLine Prod. Order Routing Line Typically, the ‘main’ record the tests are associated against.
precItemLedgerEntry Item Ledger Entry The item ledger entry related to this sequence of events.
precProdOrderLine Prod. Order Line The production order line involved in this sequence of events.
precItemJournalLine Item Journal Line The item journal line record involved in this transaction. Important: this record may no longer exist, and should not be altered..
pbHandled Boolean Set to true to replace the default behavior.

OnAfterProductionAttemptCreateAutomaticTest

OnAfterProductionAttemptCreateAutomaticTest is called after attempting to automatically create a test for production.

[IntegrationEvent(False,False)]
procedure OnAfterProductionAttemptCreateAutomaticTest(var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precItemLedgerEntry: Record "Item Ledger Entry", var precProdOrderLine: Record "Prod. Order Line", var precItemJournalLine: Record "Item Journal Line")

Parameters

Name Type Description
precProdOrderRoutingLine Prod. Order Routing Line Typically, the ‘main’ record the tests are associated against.
precItemLedgerEntry Item Ledger Entry The item ledger entry related to this sequence of events.
precProdOrderLine Prod. Order Line The production order line involved in this sequence of events.
precItemJournalLine Item Journal Line The item journal line record involved in this transaction. Important: this record may no longer exist and should not be altered.

OnBeforeProductionAttemptCreateReleaseAutomaticTest

OnBeforeProductionAttemptCreateReleaseAutomaticTest is called before attempting to automatically create a test for production related releasing.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionAttemptCreateReleaseAutomaticTest(var precProductionOrder: Record "Production Order", var pbHandled: Boolean)

Parameters

Name Type Description
precProductionOrder Production Order The production order.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterProductionAttemptCreateReleaseAutomaticTest

OnAfterProductionAttemptCreateReleaseAutomaticTest is called before attempting to automatically create a test for production related releasing. Use this if you need to collect multiple tests that could be created as part of a posting sequence.

[IntegrationEvent(False,False)]
procedure OnAfterProductionAttemptCreateReleaseAutomaticTest(var precProductionOrder: Record "Production Order", pbCreatedAtLeastOneTestForRoutingLine: Boolean, pbCreatedAtLeastOneTestForOrderLine: Boolean, pbCreatedTestForProdOrder: Boolean, plstOfTests: List of [RecordId])

Parameters

Name Type Description
precProductionOrder Production Order The production order.
pbCreatedAtLeastOneTestForRoutingLine Boolean A flag indicating if at least one test for the production order routing line was created.
pbCreatedAtLeastOneTestForOrderLine Boolean A flag indicating if at least one test for the production order line was created.
pbCreatedTestForProdOrder Boolean A flag indicating if at least one test for the production order was created.
plstOfTests List A list of record IDs of the tests that were created.

OnBeforeFindExistingTests

OnBeforeFindExistingTests provides an opportunity to override how an existing test is found.

[IntegrationEvent(False,False)]
procedure OnBeforeFindExistingTests(prrefTargetRecordRef: RecordRef, prrefOptional2RecordRef: RecordRef, prrefOptional3RecordRef: RecordRef, prrefOptional4RecordRef: RecordRef, var precOutTest: Record "IWX QI Test", var rbOut: Boolean, var pbHandled: Boolean)

Parameters

Name Type Description
prrefTargetRecordRef RecordRef The main target record that the test will be created against.
prrefOptional2RecordRef RecordRef Optional. Some events, typically automatic events, will have multiple records to assist with setting source details.
prrefOptional3RecordRef RecordRef Optional. Some events, typically automatic events, will have multiple records to assist with setting source details.
prrefOptional4RecordRef RecordRef Optional. Some events, typically automatic events, will have multiple records to assist with setting source details.
precOutTest IWX QI Test The found test
rbOut Boolean Set to true if you found the record. If you set to true, you must also supply precOutTest.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeProductionVerifyFinishedTestExistsForPosting

OnBeforeProductionVerifyFinishedTestExistsForPosting provides an opportunity to override verification logic if a finished test exists.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionVerifyFinishedTestExistsForPosting(var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precItemLedgerEntry: Record "Item Ledger Entry", var precProdOrderLine: Record "Prod. Order Line", var precItemJournalLine: Record "Item Journal Line", var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
precProdOrderRoutingLine Prod. Order Routing Line Typically, the main record the tests are associated against.
precItemLedgerEntry Item Ledger Entry The item ledger entry related to this sequence of events.
precProdOrderLine Prod. Order Line The production order line involved in this sequence of events.
precItemJournalLine Item Journal Line The item journal line record involved in this transaction. Important: this record may no longer exist and should not be altered.
piMinimumExpectedTests Integer The expected minimum number of tests. Change this number if you have custom logic that dictates how many tests should be created at this point.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterProductionVerifyFinishedTestExistsForPosting

OnAfterProductionVerifyFinishedTestExistsForPosting provides an opportunity to override verification logic if a finished test exists.

[IntegrationEvent(False,False)]
procedure OnAfterProductionVerifyFinishedTestExistsForPosting(var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precItemLedgerEntry: Record "Item Ledger Entry", var precProdOrderLine: Record "Prod. Order Line", var precItemJournalLine: Record "Item Journal Line", var piMinimumExpectedTests: Integer)

Parameters

Name Type Description
precProdOrderRoutingLine Prod. Order Routing Line Typically, the ‘main’ record the tests are associated against.
precItemLedgerEntry Item Ledger Entry The item ledger entry related to this sequence of events.
precProdOrderLine Prod. Order Line The production order line involved in this sequence of events.
precItemJournalLine Item Journal Line The item journal line record involved in this transaction. Important: this record may no longer exist and should not be altered.
piMinimumExpectedTests Integer This was the minimum expected tests calculated by the system.

OnBeforeProductionVerifyFinishedTestExistsForProdRoutingLine

OnBeforeProductionVerifyFinishedTestExistsForProdRoutingLine gives an opportunity to verify finished tests from the context of a production order routing line.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionVerifyFinishedTestExistsForProdRoutingLine(var precProdOrderLine: Record "Prod. Order Line", var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
precProdOrderLine Prod. Order Line VAR Record “Prod. Order Line”.
precProdOrderRoutingLine Prod. Order Routing Line The production order routing line.
piMinimumExpectedTests Integer VAR Integer.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeReceivingVerifyFinishedTestExistsForPurchaseLine

OnBeforeReceivingVerifyFinishedTestExistsForPurchaseLine gives an opportunity to verify finished tests from the context of a purchase line.

[IntegrationEvent(False,False)]
procedure OnBeforeReceivingVerifyFinishedTestExistsForPurchaseLine(var precPurchaseLine: Record "Purchase Line", var precPurchaseHeader: Record "Purchase Header", var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
precPurchaseLine Purchase Line The purchase line.
precPurchaseHeader Purchase Header The purchase header.
piMinimumExpectedTests Integer The minimum expected tests.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeReceivingVerifyFinishedTestExistsForWarehouseJournalLine

OnBeforeReceivingVerifyFinishedTestExistsForWarehouseJournalLine gives an opportunity to verify finished tests from the context of a warehouse journal line during a warehouse receipt post.

[IntegrationEvent(False,False)]
procedure OnBeforeReceivingVerifyFinishedTestExistsForWarehouseJournalLine(var precWarehouseJournalLine: Record "Warehouse Journal Line", precPostedWhseReceiptHeader: Record "Posted Whse. Receipt Header", var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
precWarehouseJournalLine Warehouse Journal Line The warehouse journal line.
precPostedWhseReceiptHeader Posted Whse. Receipt Header The posted warehouse receipt header. This might not yet be committed to the database.
piMinimumExpectedTests Integer The minimum expected tests.
pbHandled Boolean Set to true to replace the default behavior.

OnProductionVerifyFinishedTestExistsBeforeError

Implement this to override handling of an error message for production. For example to convert an error message into a confirm dialog or a message dialog or to bypass the errors entirely then you could implement this event.

[IntegrationEvent(False,False)]
procedure OnProductionVerifyFinishedTestExistsBeforeError(var ptxtErrorMessage: Text, var precExistingTests: Record "IWX QI Test", var pbFoundTests: Boolean, var ptxtDocumentNoHint: Text, var ptxtItemNoHint: Text, var pvarOptionalRec1Variant: Variant, var pvarOptionalRec2Variant: Variant, var pvarOptionalRec3Variant: Variant, var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
ptxtErrorMessage Text The error message.
precExistingTests IWX QI Test The existing tests.
pbFoundTests Boolean If tests were found.
ptxtDocumentNoHint Text A document number hint text.
ptxtItemNoHint Text Item number hint text.
pvarOptionalRec1Variant Variant Can vary depending on the posting details.
pvarOptionalRec2Variant Variant Can vary depending on the posting details.
pvarOptionalRec3Variant Variant Can vary depending on the posting details.
piMinimumExpectedTests Integer The expected minimum number of tests.
pbHandled Boolean Set to true to replace the default behavior.

OnReceivingVerifyFinishedTestExistsBeforeError

Implement this to override handling of an error message for purchase For example to convert an error message into a confirm dialog or a message dialog or to bypass the errors entirely then you could implement this event.

[IntegrationEvent(False,False)]
procedure OnReceivingVerifyFinishedTestExistsBeforeError(var ptxtErrorMessage: Text, var precExistingTests: Record "IWX QI Test", var pbFoundTests: Boolean, var ptxtDocumentNoHint: Text, var ptxtItemNoHint: Text, var pvarOptionalRec1Variant: Variant, var pvarOptionalRec2Variant: Variant, var pvarOptionalRec3Variant: Variant, var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
ptxtErrorMessage Text The error message.
precExistingTests IWX QI Test VAR Record “IWX QI Test”.
pbFoundTests Boolean Whether tests were found.
ptxtDocumentNoHint Text A single or multiple document references. Intended for humans, not systems.
ptxtItemNoHint Text A single or multiple item references. Intended for humans, not systems.
pvarOptionalRec1Variant Variant Can vary depending on the posting details.
pvarOptionalRec2Variant Variant Can vary depending on the posting details.
pvarOptionalRec3Variant Variant Can vary depending on the posting details.
piMinimumExpectedTests Integer The minimum expected tests.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeProductionHandleOnAfterPostOutput

Gives an opportunity to override any handle of onafterpostoutput. Use this to completely replace any automatic test creation on output and/or any automatic test validation on output.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionHandleOnAfterPostOutput(var precItemLedgerEntry: Record "Item Ledger Entry", var ProdOrderLine: Record "Prod. Order Line", var ItemJournalLine: Record "Item Journal Line", var pbHandled: Boolean)

Parameters

Name Type Description
precItemLedgerEntry Item Ledger Entry The item ledger entry related to this sequence of events.
ProdOrderLine Prod. Order Line The production order line involved in this sequence of events.
ItemJournalLine Item Journal Line The item journal line record involved in this transaction. Important: this record may no longer exist and should not be altered.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeProductionHandleVerifyFinishedTestExistsEveryXUnits

Gives an opportunity to alter the behavior of validation of every x units validation.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionHandleVerifyFinishedTestExistsEveryXUnits(var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precItemLedgerEntry: Record "Item Ledger Entry", var ProdOrderLine: Record "Prod. Order Line", var ItemJournalLine: Record "Item Journal Line", var pbHandled: Boolean)

Parameters

Name Type Description
precProdOrderRoutingLine Prod. Order Routing Line The production order routing line.
precItemLedgerEntry Item Ledger Entry The item ledger entry related to this sequence of events.
ProdOrderLine Prod. Order Line The production order line.
ItemJournalLine Item Journal Line VAR Record “Item Journal Line”.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeProductionHandleVerifyFinishedTestExistsEveryXTime

Gives an opportunity to alter the behavior of validation of every x units of time.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionHandleVerifyFinishedTestExistsEveryXTime(var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precItemLedgerEntry: Record "Item Ledger Entry", var ProdOrderLine: Record "Prod. Order Line", var ItemJournalLine: Record "Item Journal Line", var pbHandled: Boolean)

Parameters

Name Type Description
precProdOrderRoutingLine Prod. Order Routing Line The production order routing line.
precItemLedgerEntry Item Ledger Entry The item ledger entry related to this sequence of events.
ProdOrderLine Prod. Order Line The production order line.
ItemJournalLine Item Journal Line VAR Record “Item Journal Line”.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeProductionHandleFinishedTestVerification

Gives an opportunity to override finished test verification for production.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionHandleFinishedTestVerification(var precExistingTests: Record "IWX QI Test", var pbFoundTests: Boolean, var ptxtDocumentNoHint: Text, var ptxtItemNoHint: Text, var pvarOptionalRec1Variant: Variant, var pvarOptionalRec2Variant: Variant, var pvarOptionalRec3Variant: Variant, var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
precExistingTests IWX QI Test
pbFoundTests Boolean Whether tests were found.
ptxtDocumentNoHint Text A single or multiple document references. Intended for humans, not systems.
ptxtItemNoHint Text A single or multiple item references. Intended for humans, not systems.
pvarOptionalRec1Variant Variant
pvarOptionalRec2Variant Variant
pvarOptionalRec3Variant Variant
piMinimumExpectedTests Integer The minimum expected tests.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeReceivingHandleFinishedTestVerification

Gives an opportunity to override finished test verification for receiving.

[IntegrationEvent(False,False)]
procedure OnBeforeReceivingHandleFinishedTestVerification(var precExistingTests: Record "IWX QI Test", var pbFoundTests: Boolean, var ptxtDocumentNoHint: Text, var ptxtItemNoHint: Text, var pvarOptionalRec1Variant: Variant, var pvarOptionalRec2Variant: Variant, var pvarOptionalRec3Variant: Variant, var piMinimumExpectedTests: Integer, var pbHandled: Boolean)

Parameters

Name Type Description
precExistingTests IWX QI Test
pbFoundTests Boolean Whether tests were found.
ptxtDocumentNoHint Text A single or multiple document references. Intended for humans, not systems.
ptxtItemNoHint Text A single or multiple item references. Intended for humans, not systems.
pvarOptionalRec1Variant Variant
pvarOptionalRec2Variant Variant
pvarOptionalRec3Variant Variant
piMinimumExpectedTests Integer The minimum expected tests.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeProductionHandleOnAfterChangeStatusOnProdOrder

Gives an opportunity to supplement or replace automatic test creation on finish, and validation of tests on finish.

[IntegrationEvent(False,False)]
procedure OnBeforeProductionHandleOnAfterChangeStatusOnProdOrder(var precFromProductionOrder: Record "Production Order", var precToProductionOrder: Record "Production Order", var pbHandled: Boolean)

Parameters

Name Type Description
precFromProductionOrder Production Order
precToProductionOrder Production Order
pbHandled Boolean Set to true to replace the default behavior.

OnBeforeValidateQualityInspectorSettings

Occurs when changing settings on the quality inspector setup page.

[IntegrationEvent(False,False)]
procedure OnBeforeValidateQualityInspectorSettings(var precXOldSetup: Record "IWX QI Setup", var precNewSetup: Record "IWX QI Setup", var pbHandled: Boolean)

Parameters

Name Type Description
precXOldSetup IWX QI Setup
precNewSetup IWX QI Setup
pbHandled Boolean Set to true to replace the default behavior.

OnBeforePurchaseAttemptCreateTestWithReceiptLine

Use this to integrate with purchase auto tests before the tests are created.

[IntegrationEvent(False,False)]
procedure OnBeforePurchaseAttemptCreateTestWithReceiptLine(var precWarehouseReceiptLine: Record "Warehouse Receipt Line", var precWarehouseReceiptHeader: Record "Warehouse Receipt Header", var precPurchaseLine: Record "Purchase Line", var pbHandled: Boolean)

Parameters

Name Type Description
precWarehouseReceiptLine Warehouse Receipt Line
precWarehouseReceiptHeader Warehouse Receipt Header
precPurchaseLine Purchase Line The purchase line.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterPurchaseAttemptCreateTestWithReceiptLine

Use this to integrate after a test has been automatically created.

[IntegrationEvent(False,False)]
procedure OnAfterPurchaseAttemptCreateTestWithReceiptLine(var pbHasTest: Boolean, var precTest: Record "IWX QI Test", var precWarehouseReceiptLine: Record "Warehouse Receipt Line", var precWarehouseReceiptHeader: Record "Warehouse Receipt Header", var precPurchaseLine: Record "Purchase Line", var pbHandled: Boolean)

Parameters

Name Type Description
pbHasTest Boolean
precTest IWX QI Test The quality inspection test involved.
precWarehouseReceiptLine Warehouse Receipt Line
precWarehouseReceiptHeader Warehouse Receipt Header
precPurchaseLine Purchase Line The purchase line.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforePurchaseAttemptCreateTestWithWhseJournalLine

Use this to integrate with purchase auto tests before the tests are created.

[IntegrationEvent(False,False)]
procedure OnBeforePurchaseAttemptCreateTestWithWhseJournalLine(var precWarehouseJournalLine: Record "Warehouse Journal Line", precPostedWhseReceiptHeader: Record "Posted Whse. Receipt Header", var pbHandled: Boolean)

Parameters

Name Type Description
precWarehouseJournalLine Warehouse Journal Line VAR Record “Warehouse Journal Line”.
precPostedWhseReceiptHeader Posted Whse. Receipt Header Record “Posted Whse. Receipt Header”.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterPurchaseAttemptCreateTestWithWhseJournalLine

Use this to integrate after a test has been automatically created.

[IntegrationEvent(False,False)]
procedure OnAfterPurchaseAttemptCreateTestWithWhseJournalLine(var pbHasTest: Boolean, var precTest: Record "IWX QI Test", var precWarehouseJournalLine: Record "Warehouse Journal Line", precPostedWhseReceiptHeader: Record "Posted Whse. Receipt Header", var pbHandled: Boolean)

Parameters

Name Type Description
pbHasTest Boolean
precTest IWX QI Test The quality inspection test involved.
precWarehouseJournalLine Warehouse Journal Line VAR Record “Warehouse Journal Line”.
precPostedWhseReceiptHeader Posted Whse. Receipt Header Record “Posted Whse. Receipt Header”.
pbHandled Boolean Set to true to replace the default behavior.

OnBeforePurchaseAttemptCreateTestWithPurchaseLine

Use this to integrate with purchase auto tests before the tests are created.

[IntegrationEvent(False,False)]
procedure OnBeforePurchaseAttemptCreateTestWithPurchaseLine(var precPurchaseLine: Record "Purchase Line", var precPurchaseHeader: Record "Purchase Header", var ptrecTempTrackingSpecification: Record "Tracking Specification" temporary, var pbHandled: Boolean)

Parameters

Name Type Description
precPurchaseLine Purchase Line The purchase line.
precPurchaseHeader Purchase Header The purchase header.
ptrecTempTrackingSpecification Tracking Specification Temporary VAR Record “Tracking Specification”.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterPurchaseAttemptCreateTestWithPurchaseLine

Use this to integrate after a test has been automatically created.

[IntegrationEvent(False,False)]
procedure OnAfterPurchaseAttemptCreateTestWithPurchaseLine(var pbHasTest: Boolean, var precTest: Record "IWX QI Test", var precPurchaseLine: Record "Purchase Line", var precPurchaseHeader: Record "Purchase Header", var ptrecTempTrackingSpecification: Record "Tracking Specification" temporary, var pbHandled: Boolean)

Parameters

Name Type Description
pbHasTest Boolean
precTest IWX QI Test The quality inspection test involved.
precPurchaseLine Purchase Line The purchase line.
precPurchaseHeader Purchase Header The purchase header.
ptrecTempTrackingSpecification Tracking Specification Temporary VAR Record “Tracking Specification”.
pbHandled Boolean Set to true to replace the default behavior.

OnInitializeQualityInspectionDocumentNo

Use this to change how a quality inspection document no. is generated. This is called via InitEntryNoIfNeeded. Use this if you need to customize your document no. series used for quality inspection tests.

[IntegrationEvent(False,False)]
procedure OnInitializeQualityInspectionDocumentNo(var precTest: Record "IWX QI Test")

Parameters

Name Type Description
precTest IWX QI Test The quality inspection test involved.

OnBeforeTakePicture

OnBeforeTakePicture occurs before a picture has been taken. Use this to replace with your own picture taking dialog.

[IntegrationEvent(False,False)]
procedure OnBeforeTakePicture(var precTest: Record "IWX QI Test", var pbHandled: Boolean)

Parameters

Name Type Description
precTest IWX QI Test VAR Record “IWX QI Test”.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterTakePicture

OnAfterTakePicture occurs after a picture has been taken. Picture storage will depend on the “Picture Upload Behavior” setting.

[IntegrationEvent(False,False)]
procedure OnAfterTakePicture(var precTest: Record "IWX QI Test")

Parameters

Name Type Description
precTest IWX QI Test VAR Record “IWX QI Test”.

OnBeforeEvaluateGrade

OnBeforeEvaluateGrade gives an opportunity to change how a grade is evaluated.

[IntegrationEvent(False,False)]
procedure OnBeforeEvaluateGrade(var precTestGradeConditionConfig: Record "IWX QI Grade Condition Config", var peFieldType: Enum "IWX QI Field Type", var ptxtTestValue: Text, var rcodOut: Code[20], var pbHandled: Boolean)

Parameters

Name Type Description
precTestGradeConditionConfig IWX QI Grade Condition Config VAR record “IWX QI Grade Condition Config”.
peFieldType IWX QI Field Type VAR enum “IWX QI Field Type”.
ptxtTestValue Text VAR Text.
rcodOut Code The grade.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterEvaluateGrade

OnAfterEvaluateGrade gives an opportunity to run additional logic after a grade has been determined by the system.

[IntegrationEvent(False,False)]
procedure OnAfterEvaluateGrade(var precTestGradeConditionConfig: Record "IWX QI Grade Condition Config", var peFieldType: Enum "IWX QI Field Type", var ptxtTestValue: Text, var rcodOut: Code[20], var ptrecHighestGradeConditionConfig: Record "IWX QI Grade Condition Config" temporary, var pbHandled: Boolean)

Parameters

Name Type Description
precTestGradeConditionConfig IWX QI Grade Condition Config VAR record “IWX QI Grade Condition Config”.
peFieldType IWX QI Field Type VAR enum “IWX QI Field Type”.
ptxtTestValue Text VAR Text.
rcodOut Code VAR Code[20].
ptrecHighestGradeConditionConfig IWX QI Grade Condition Config VAR record “IWX QI Grade Condition Config” temporary.
pbHandled Boolean Set to true to replace the default behavior.

OnWorkflowHandleOnExecuteWorkflowResponseAfterFindRelatedRecord

OnWorkflowHandleOnExecuteWorkflowResponseAfterFindRelatedRecord occurs after the system has found the related record for the workflow step.

[IntegrationEvent(False,False)]
procedure OnWorkflowHandleOnExecuteWorkflowResponseAfterFindRelatedRecord(var pbResponseExecuted: Boolean, var pVariant: Variant, pxVariant: Variant, precResponseWorkflowStepInstance: Record "Workflow Step Instance", var precTargetRecordRef: RecordRef, var pbHandled: Boolean)

Parameters

Name Type Description
pbResponseExecuted Boolean VAR Boolean.
pVariant Variant VAR Variant.
pxVariant Variant Variant.
precResponseWorkflowStepInstance Workflow Step Instance Record “Workflow Step Instance”.
precTargetRecordRef RecordRef VAR recordref.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterInitializeCreateTestReportParameters

Provides an opportunity to create defaults in the Create Test report page.

[IntegrationEvent(False,False)]
procedure OnAfterInitializeCreateTestReportParameters(var pcodQualityInspectionTemplateCode: Code[20], var pcodSourceTable: Code[20], var ptxtCustomFilter: Text, var pridTarget: RecordId, var prrefTargetRecordRef: RecordRef, var ptrecQualityInspectionTest: Record "IWX QI Test" temporary)

Parameters

Name Type Description
pcodQualityInspectionTemplateCode Code VAR Code[20].
pcodSourceTable Code VAR Code[20].
ptxtCustomFilter Text VAR Text.
pridTarget RecordId VAR RecordId.
prrefTargetRecordRef RecordRef VAR RecordRef.
ptrecQualityInspectionTest IWX QI Test VAR record “IWX QI Test” temporary.

OnSetUsageFilterOnAfterSetFiltersByReportUsage

OnSetUsageFilterOnAfterSetFiltersByReportUsage gives an opportunity to extend the report usage filtering.

[IntegrationEvent(False,False)]
procedure OnSetUsageFilterOnAfterSetFiltersByReportUsage(var pRecReportSelections: Record "Report Selections", peReportSelectionUsage: Enum "IWX QI Report Selection Usage")

Parameters

Name Type Description
pRecReportSelections Report Selections VAR Record “Report Selections”.
peReportSelectionUsage IWX QI Report Selection Usage Enum “IWX QI Report Selection Usage”.

OnBeforeFindLineUpdateGradeFromLines

This is called when the Quality Inspection Test header is being updated automatically based on the test lines. Use this to optionally alter the filters on the test line before the test has been found. This can be used to influence how the test header automatically changes. You can also avoid the test header changing by implementing this and just setting pbHandled to ‘true’ causing it to exit immediately.

[IntegrationEvent(False,False)]
procedure OnBeforeFindLineUpdateGradeFromLines(var precTest: Record "IWX QI Test", var precTestLine: Record "IWX QI Test Line", var pbHandled: Boolean)

Parameters

Name Type Description
precTest IWX QI Test The quality inspection test involved.
precTestLine IWX QI Test Line The quality inspection test involved.
pbHandled Boolean Set to true to replace the default behavior.

OnAfterFindLineUpdateGradeFromLines

This is called when the Quality Inspection Test header is being updated automatically based on the test lines. Use this to inspect or adjust the grade that the system automatically chose.

[IntegrationEvent(False,False)]
procedure OnAfterFindLineUpdateGradeFromLines(var precTest: Record "IWX QI Test", var precTestLine: Record "IWX QI Test Line")

Parameters

Name Type Description
precTest IWX QI Test The quality inspection test involved.
precTestLine IWX QI Test Line The quality inspection test involved.