---
title: "Events defined in Shop Floor Insight"
app: "Shop Floor Insight"
section: "Developer"
last_updated: "2024-11-15"
url: "https://insight-works.com/kb/shop-floor-insight/events-defined-in-shop-floor-insight/"
---

# Events defined in Shop Floor Insight

### Properties

| **Property** | **Value** |
| --- | --- |
| Object ID | 23044144 |

### Events

#### OnBeforePrepareTimeCard

Occurs before a time card is prepared. Use this to add your own preparation prior to the default Shop Floor preparation steps. You can also completely change the default preparation codeunit by setting the “Preparation Codeunit” codeunit on the Shop Floor Setup page.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterPrepareTimeCard(var precTimeCard: Record "SFI Time Card Header")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | Record “SFI Time Card Header” | The time card. |

#### OnAfterPrepareTimeCard

Occurs after a time card is prepared. Use this to extend your own preparation logic after the default Shop Floor preparation steps. You can also completely change the default preparation codeunit by setting the “Preparation Codeunit” codeunit on the Shop Floor Setup page.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterPrepareTimeCard(var precTimeCard: Record "SFI Time Card Header")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ | the time card |

#### OnBeforeValidateTimeCard

An opportunity to validate the time card before the default validation occurs.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeValidateTimeCard(var precTimeCard: Record "SFI Time Card Header", var pbCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| pbCancel | _Boolean_ | set to true to cancel the validation. |

#### OnValidateTimeCard

This occurs after OnBeforeValidateTimeCard and after existing validation messages are cleared out.

##### [IntegrationEvent(False,False)]

```
procedure OnValidateTimeCard(var precTimeCard: Record "SFI Time Card Header", pbShowErrors: Boolean, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| pbShowErrors | _Boolean_ | Can not be changed. This is whether or not errors should be shown. When this is true expect the validation dialog box to show when error occur. |
| pbHandled | _Boolean_ | Set to true to replace all standard validations. Set to false to add your own validation messages. |

#### OnAfterValidateTimeCard

This occurs after a time card has been validated, after the dialog has been shown, but before the workflow for time card validation has started.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterValidateTimeCard(var precTimeCard: Record "SFI Time Card Header")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |

#### OnBeforeValidateTimeCardLine

Occurs before any time card line validation was handled.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeValidateTimeCardLine(var precTimeCardLine: Record "SFI Time Card Line", pbShowErrors: Boolean, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| pbShowErrors | _Boolean_ |  |
| pbHandled | _Boolean_ | Set to true to completely replace product behavior for the line. Set to false to extend and add your own validation messages |

#### OnValidateTimeCardLine

This will get called after OnBeforeValidateTimeCardLine has been called and during validation messages for a specific line, after specific line messages have been cleared out.

##### [IntegrationEvent(False,False)]

```
procedure OnValidateTimeCardLine(var precTimeCardLine: Record "SFI Time Card Line", pbShowErrors: Boolean, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| pbShowErrors | _Boolean_ |  |
| pbHandled | _Boolean_ | Set to true to replace all standard validations. Set to false to add your own validation messages. |

#### OnAfterValidateTimeCardLine

This will get called after validation messages have been added for a given line.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterValidateTimeCardLine(var precTimeCardLine: Record "SFI Time Card Line", pbShowErrors: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| pbShowErrors | _Boolean_ |  |

#### OnBeforeApproveTimeCard

This will get called before a time card is approved. Use this to run your own approval logic prior to the default approval logic.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeApproveTimeCard(var precTimeCard: Record "SFI Time Card Header", var pbCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| pbCancel | _Boolean_ | Set to true to cancel the approval and prevent the time card from being approved. |

#### OnAfterApproveTimeCard

This will get called after a time card is approved and after the card has been closed. Use this to run additional logic after a card has been approved or not. Do not use this to add additional approval logic, because the approved and closed flags will already have been set.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterApproveTimeCard(var precTimeCard: Record "SFI Time Card Header")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |

#### OnBeforePostTimeCard

Occurs before a time card has been posted. To completely replace posting logic, you could perform your logic in here, then set pbCancel to true.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforePostTimeCard(var precTimeCard: Record "SFI Time Card Header", var pbCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| pbCancel | _Boolean_ | Set to true to cancel the default post logic. |

#### OnAfterPostTimeCard

This occurs after all posting for the card has happened. Use this to do any post-processing or other triggers after a card has been posted.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterPostTimeCard(var precTimeCard: Record "SFI Time Card Header")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |

#### OnBeforeCreateTimeCardShopFloor

OnBeforeCreateTimeCardShopFloor occurs during the sequence of events when the Shop Floor client (scanning station) is in the process of creating a new card. The card will have been initalized and the client config no. set, but nothing else. This will not get called when a card is created manually in Business Central. You can use this to change the alter the logic of whether a new card should be created or not.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeCreateTimeCardShopFloor(var precTimeCard: Record "SFI Time Card Header", var pbCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| pbCancel | _Boolean_ | Set to true to prevent the new time card from being inserted. |

#### OnBeforeRecordOutput

Occurs in the web service call to record output from the Shop Floor Client and the record output workflow response. This occurs when only the input parameters are available to record output. Use this as an opportunity to completely replace the production output reporting. Set pbCancel to true to replace the logic with your own. Set pbCancel to false to run any additional logic or validation checks prior to recording output. For example if you want to verify that some checklists are done, or that other tasks are complete first but still use the default logic then you would extend the event, run your verification logic, but keep pbCancel to false.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeRecordOutput(var pcodBatchName: Text, var pcodProdOrderNo: Text, var piProdOrderLineNo: Integer, var pcodItemNo: Text, var pcodVariant: Text, var pdQuantity: Decimal, var pdScrap: Decimal, var pcodScrapCode: Text, var pcodLotNumber: Text, var pcodSerialNumber: Text, var pcodLocationCode: Text, var pcodBinCode: Text, var pcodTimeCardHeaderNo: Code[20], var piTimeCardLineNo: Integer, var pcodOperationNo: Text, var poptType: Option, var pcodNo: Text, var pcodWorkCenterNo: Text, var pbCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodBatchName | _Text_ |  |
| pcodProdOrderNo | _Text_ |  |
| piProdOrderLineNo | _Integer_ |  |
| pcodItemNo | _Text_ |  |
| pcodVariant | _Text_ |  |
| pdQuantity | _Decimal_ |  |
| pdScrap | _Decimal_ |  |
| pcodScrapCode | _Text_ |  |
| pcodLotNumber | _Text_ |  |
| pcodSerialNumber | _Text_ |  |
| pcodLocationCode | _Text_ |  |
| pcodBinCode | _Text_ |  |
| pcodTimeCardHeaderNo | _Code[20]_ |  |
| piTimeCardLineNo | _Integer_ |  |
| pcodOperationNo | _Text_ |  |
| poptType | _Option_ |  |
| pcodNo | _Text_ |  |
| pcodWorkCenterNo | _Text_ |  |
| pbCancel | _Boolean_ | Set to true to replace default posting. Set to false to run your own additional validation prior to posting. |

#### OnAfterRecordOutput

OnAfterRecordOutput occurs after the journal lines have been created and populated with all details. Output will be in precOutputJournalLine Scrap will be reported separately in precScrapJournalLine Output journal lines will have set: order no. order line no. item no. variant code operation no. scrap quantity (if scrap) type (work center or machine center) no. (the work center no.)or machine center no. scrap code Shop Floor Time Card No. Shop Floor Time Card Line No. Shop Floor Client Config No. Shop Floor Shop Floor Employee No. Shop Floor Output Recorded DateTime Location code if supplied Bin code if supplied. if the “production output dimensions” flag from the Shop Floor Setup page is set to “Copy From Time Card Line” then it will also set Dimension Set ID, Shortcut Dimension 1 Code, and Shortcut Dimension 2 code as long as those fields are not blank on the time card line; otherwise, it will default the dimensions as per standard Business Central logic.rk center no. Output Quantity If recording output to a license plate on the last operation then “SFI License Plate No.”

##### [IntegrationEvent(False,False)]

```
procedure OnAfterRecordOutput(var pcodBatchName: Text, pcodProdOrderNo: Text, piProdOrderLineNo: Integer, pcodItemNo: Text, pcodVariant: Text, pdQuantity: Decimal, pdScrap: Decimal, pcodScrapCode: Text, pcodLotNumber: Text, pcodSerialNumber: Text, pcodLocationCode: Text, pcodBinCode: Text, pcodTimeCardHeaderNo: Code[20], piTimeCardLineNo: Integer, pcodOperationNo: Text, poptType: Option, pcodNo: Text, pcodWorkCenterNo: Text, precOutputJournalLine: Record "Item Journal Line", precScrapJournalLine: Record "Item Journal Line")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodBatchName | _Text_ |  |
| pcodProdOrderNo | _Text_ |  |
| piProdOrderLineNo | _Integer_ |  |
| pcodItemNo | _Text_ |  |
| pcodVariant | _Text_ |  |
| pdQuantity | _Decimal_ |  |
| pdScrap | _Decimal_ |  |
| pcodScrapCode | _Text_ |  |
| pcodLotNumber | _Text_ |  |
| pcodSerialNumber | _Text_ |  |
| pcodLocationCode | _Text_ |  |
| pcodBinCode | _Text_ |  |
| pcodTimeCardHeaderNo | _Code[20]_ |  |
| piTimeCardLineNo | _Integer_ |  |
| pcodOperationNo | _Text_ |  |
| poptType | _Option_ |  |
| pcodNo | _Text_ |  |
| pcodWorkCenterNo | _Text_ |  |
| precOutputJournalLine | _Record “Item Journal Line”_ |  |
| precScrapJournalLine | _Record “Item Journal Line”_ |  |

#### OnBeforeProdDispatchSearch

This will occur after initial filters have been set but prior to searching data in the prod order routing lines. This gives an opportunity to add your own searching before the default search, or add additional filters. Prior to this: If specific date ranges have been defined then starting date-time and ending date-time will be set. If on the Shop Floor Setup a global dispatch filter start and end dates has been configured, then that filter will be set in filter group 10 (ten). The ‘status’ filter will be set (probably to released in most circumstances) If you are using ‘Dispatch Employee Filtering’ configured on the Shop Floor Setup page then filters will be set on “SFI Assigned-To No.” in filter group 0 (zero) If you have set dispatch filters on the Shop Floor Setup page (not client configurations) then that set of filters will be configured in filter group 11 (eleven) If you have set dispatch filters on the shop floor client configuration then those will be set in filter group 12 (twelve) Special circumstances on a rarely used feature: If you’re using the legacy Shop Floor Datasources then those additional filters will be set in filter group 13 ( thirteen ) All of these are set prior to OnBeforeProdDispatchSearch is called.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeProdDispatchSearch(var ptxtSearch: Text, var precProdOrderRoutingLine: Record "Prod. Order Routing Line")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtSearch | _Text_ | What the user typed on the shop floor. |
| precProdOrderRoutingLine | _Record “Prod. Order Routing Line”_ | Set additional filters on here if desired. |

#### OnAfterProdDispatchSearch

Occurs after all default production dispatch searching has occurred. You can use this event as an opportunity to do additional searching if no records have yet been found.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterProdDispatchSearch(var ptxtSearch: Text, var precProdOrderRoutingLine: Record "Prod. Order Routing Line")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtSearch | _Text_ |  |
| precProdOrderRoutingLine | _Record “Prod. Order Routing Line”_ |  |

#### OnBeforeJobTaskDispatchSearch

Occurs before job tasks are searched when someone is searching for specific text on the dispatch screen. This gives an opportunity to add your own searching before the default search, or add additional filters. Prior to this: If specific date ranges have been defined then starting date-time and ending date-time will be set. If on the Shop Floor Setup, a global dispatch filter start and end dates has been configured, then that filter will be set in filter group 10 (ten). If you are using “Dispatch Employee Filtering”‘ configured on the Shop Floor Setup page, then filters will be set on “SFI Assigned-To No.” in filter group 0 (zero) If you have set job task filters on the Shop Floor Setup page (not client configurations), then that set of filters will be configured in filter group 11 (eleven) If you have set job task filters on the shop floor client configuration, then those will be set in filter group 12 (twelve) All of these are set prior to OnBeforeJobTaskDispatchSearch is called.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeJobTaskDispatchSearch(var ptxtSearch: Text, var precJobTask: Record "Job Task")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtSearch | _Text_ |  |
| precJobTask | _Record “Job Task”_ |  |

#### OnAfterJobTaskDispatchSearch

Occurs after job tasks have been searched. You could use this to add extra search logic if there are no records found.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterJobTaskDispatchSearch(var ptxtSearch: Text, var precJobTask: Record "Job Task")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtSearch | _Text_ |  |
| precJobTask | _Record “Job Task”_ |  |

#### OnResizeEmployeeImage

Provides an opportunity to resize employee images before they are sent to the shop floor.

##### [IntegrationEvent(False,False)]

```
procedure OnResizeEmployeeImage(var pbInStream: InStream, var pcodEmployeeNo: Code[20], var piSpecificWidth: Integer, var piSpecificHeight: Integer, var pbtPicture: BigText, var pbHandled: Boolean, var pbSubscriberHasPopulatedBigText: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pbInStream | _InStream_ |  |
| pcodEmployeeNo | _Code[20]_ |  |
| piSpecificWidth | _Integer_ |  |
| piSpecificHeight | _Integer_ |  |
| pbtPicture | _BigText_ |  |
| pbHandled | _Boolean_ |  |
| pbSubscriberHasPopulatedBigText | _Boolean_ |  |

#### OnResizeItemImage

Provides an opportunity to resize item images before they are sent to the shop floor.

##### [IntegrationEvent(False,False)]

```
procedure OnResizeItemImage(var pbInStream: InStream, var pcodItemNo: Code[20], var piSpecificWidth: Integer, var piSpecificHeight: Integer, var pbtPicture: BigText, var pbHandled: Boolean, var pbSubscriberHasPopulatedBigText: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pbInStream | _InStream_ |  |
| pcodItemNo | _Code[20]_ |  |
| piSpecificWidth | _Integer_ |  |
| piSpecificHeight | _Integer_ |  |
| pbtPicture | _BigText_ |  |
| pbHandled | _Boolean_ |  |
| pbSubscriberHasPopulatedBigText | _Boolean_ |  |

#### OnPromptExportBlobToFile

#### Obsolete

This element will become obsolete from version deprecated. No longer used. No longer used. Occurs when the obsolete PromptExportBlobToFile is called, This occurs before DownloadFromStream has been called, giving an opportunity to replace the default behavior.

##### [Obsolete(No longer used,deprecated)]

##### [IntegrationEvent(False,False)]

```
procedure OnPromptExportBlobToFile(var ptxtFilterString: Text[50], var ptxtFileExtension: Text[10], var pisBlob: InStream, var pbIsHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtFilterString | _Text[50]_ |  |
| ptxtFileExtension | _Text[10]_ |  |
| pisBlob | _InStream_ |  |
| pbIsHandled | _Boolean_ |  |

#### OnBeforeRoundDecimalLineTime

This occurs when rounding is configured, giving an opportunity to cancel or replace rounding logic. Consider using line rounding rules instead of code. See _[How to automatically round time card line entries](/kb/shop-floor-insight/how-to-automatically-round-time-card-line-entries/)_ and _[Line Rounding of First Time Card Line for more information](/kb/shop-floor-insight/line-rounding-of-first-time-card-line/)_.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeRoundDecimalLineTime(precLine: Record "SFI Time Card Line", poptType: Option, pdIn: Decimal, var pdOut: Decimal, var pbCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precLine | _Record “SFI Time Card Line”_ | The time card line |
| poptType | _Option_ | 0=disabled, 1=runtime, 2=setup time, 3=start time, 4=stop time are technically possible but only 1 and 2 are likely. |
| pdIn | _Decimal_ | The input decimal time being rounded. |
| pdOut | _Decimal_ | Set this with your rounded output. |
| pbCancel | _Boolean_ | Set to true to prevent default rounding from occurring. |

#### OnAfterRoundDecimalLineTime

Occurs during the rounding process for decimal time (like run time and setup time), after the rounding has been defined, but before the rounded value has been applied to the time card line.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterRoundDecimalLineTime(precLine: Record "SFI Time Card Line", poptType: Option, pdIn: Decimal, var pdOut: Decimal)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precLine | _Record “SFI Time Card Line”_ | The time card line |
| poptType | _Option_ | 0=disabled, 1=runtime, 2=setup time, 3=start time, 4=stop time are technically possible but only 1 and 2 are likely with this event. |
| pdIn | _Decimal_ | The input decimal time being rounded. |
| pdOut | _Decimal_ | Set this with your rounded output. |

#### OnBeforeCalculateDateTime

Occurs during the rounding process for date-time fields (like entry creation time and entry clock off time), before the rounding has been defined.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeCalculateDateTime(precLine: Record "SFI Time Card Line", poptType: Option, pdtInDateTime: DateTime, var rdtOut: DateTime, var pbCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precLine | _Record “SFI Time Card Line”_ | The time card line |
| poptType | _Option_ | 0=disabled, 1=runtime, 2=setup time, 3=start time, 4=stop time are technically possible but only 3 and 4 are likely with this event. |
| pdtInDateTime | _DateTime_ | The input date time. |
| rdtOut | _DateTime_ |  |
| pbCancel | _Boolean_ |  |

#### OnAfterCalculateDateTime

Occurs during the rounding process for datetime-s time (like entry creation time and entry clock off time), after the rounding has been defined, but before the rounded date-time has been applied to the time card line.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterCalculateDateTime(precLine: Record "SFI Time Card Line", poptType: Option, pdtInDateTime: DateTime, var rdtOut: DateTime)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precLine | _Record “SFI Time Card Line”_ |  |
| poptType | _Option_ |  |
| pdtInDateTime | _DateTime_ |  |
| rdtOut | _DateTime_ |  |

#### OnBeforeScheduleChangeBeforeParse

#### Obsolete

This element will become obsolete from version deprecated. No longer used. Obsolete, no longer used. Replaced with Graphical Scheduler.

##### **[Obsolete(No longer used,deprecated)]**

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeScheduleChangeBeforeParse(psSourceName: Text, pcodConfig: Code[20], pcodEmployeeNo: Code[20], ptxtSearch: Text, pjOriginalEvent: JsonObject, pjUpdateRequestObject: JsonObject, var pbHandledAndShouldCancel: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| psSourceName | _Text_ |  |
| pcodConfig | _Code[20]_ |  |
| pcodEmployeeNo | _Code[20]_ |  |
| ptxtSearch | _Text_ |  |
| pjOriginalEvent | _JsonObject_ |  |
| pjUpdateRequestObject | _JsonObject_ |  |
| pbHandledAndShouldCancel | _Boolean_ |  |

#### OnBeforeEvaluateBarcodeRuleShopFloorIntegration

#### Obsolete

This element will become obsolete from version deprecated. Use OnEvaluateBarcodeRuleShopFloorIntegration instead.

##### [Obsolete(Use OnEvaluateBarcodeRuleShopFloorIntegration instead.,deprecated)]

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeEvaluateBarcodeRuleShopFloorIntegration(psBarcode: Text, var precBarcodeRule: Record "IWX Barcode Rule", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| psBarcode | _Text_ |  |
| precBarcodeRule | _Record “IWX Barcode Rule”_ |  |
| pbHandled | _Boolean_ |  |

#### OnEvaluateBarcodeRuleShopFloorIntegration

BeforeEvaluateBarcodeRuleShopFloorIntegration This will only get called when there is text in “SFI Prod. Desc. Expression”, or “SFI Prod. Desc. 2 Expression”, or “SFI Barcode Expression” This gets called while handling Codeunit::”IWX Decode Rule Mgmt.”, ‘OnEvaluateBarcodeRule’ You can use this to evaluate custom barcode rule based barcodes. This will also get called in two situations:

1. when an Shop Floor barcode is scanned in Warehouse Insight or Dynamic Ship setting the Shop Floor Barcode Result, presuming there is a barcode rule that configures the Shop Floor Barcode Expression. If there is an Shop Floor Barcode expression that matches to an Shop Floor Barcode Result, then after this event is called it will populate Shop Floor Barcode Key 1 Result, Shop Floor Barcode Key 2 Result, Shop Floor Barcode Key 3 Result For production orders this will end up
2. When there is searching by barcode rules for an unknown barcode scanned in the shop floor client. In that scenario it will search and refine the dispatch list or clock on based on results for: Shop Floor Barcode Key 1 Result = used for prod. order no. filtering Shop Floor Barcode Key 2 Result = used for prod. order line no. filtering Shop Floor Barcode Key 3 Result = used for prod. order routing operation no. filtering.

##### [IntegrationEvent(False,False)]

```
procedure OnEvaluateBarcodeRuleShopFloorIntegration(var psBarcode: Text, var precBarcodeRule: Record "IWX Barcode Rule", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| psBarcode | _Text_ | The barcode as received. |
| precBarcodeRule | _Record “IWX Barcode Rule”_ | The barcode rule being handled |
| pbHandled | _Boolean_ | Set to true to skip Shop Floor’s native integration |

#### OnBeforeProcessShopFloorBarcode

Use this as an opportunity to replace or cancel Shop Floor’s built-in integration with barcode rules when a shop floor insight production barcode has been scanned in another tool such as warehouse insight. This is called before any shop floor barcode rule column results are configured. This will only get called when the “SFI Barcode Result” field is populated. If pbHandled is set to true then the default shop floor handling will be skipped. If pbHandled is left false then it will then process the barcode scan and attempt to treat the barcode supplied as a shop floor insight barcode.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeProcessShopFloorBarcode(psBarcode: Text, var precBarcodeRule: Record "IWX Barcode Rule", var precSFIBarcode: Record "SFI Barcode Entry", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| psBarcode | _Text_ | The barcode as received. |
| precBarcodeRule | _Record “IWX Barcode Rule”_ | The barcode rule being handled |
| precSFIBarcode | _Record “SFI Barcode Entry”_ | The barcode entry being processed, note that only Context Original Barcode will be set. If overriding you must populate the barcode entry yourself. |
| pbHandled | _Boolean_ | Set to true to skip Shop Floor’s native integration |

#### OnSuccessfullShopFloorBarcodeBeforeApplyFilters

A Shop Floor Insight barcode has been successfully processed, but before the results have been set. Use this as an opportunity to leverage Shop Floor Insight to find a Shop Floor Insight barcode for Warehouse Insight, but before any results have been set.

##### [IntegrationEvent(False,False)]

```
procedure OnSuccessfullShopFloorBarcodeBeforeApplyFilters(psBarcode: Text, var precBarcodeRule: Record "IWX Barcode Rule", var precSFIBarcode: Record "SFI Barcode Entry", var precProdOrderLine: Record "Prod. Order Line", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| psBarcode | _Text_ | The barcode as received. |
| precBarcodeRule | _Record “IWX Barcode Rule”_ | The barcode rule being handled |
| precSFIBarcode | _Record “SFI Barcode Entry”_ | The Shop Floor barcode entry with context key 1,2,3 results being set |
| precProdOrderLine | _Record “Prod. Order Line”_ | The production order line reference |
| pbHandled | _Boolean_ | Set to true to skip Shop Floor’s native integration |

#### OnSuccessfullShopFloorBarcodeBeforeFindProdOrderLine

A Shop Floor barcode has been successfully processed, but before the results have been set. Use this as an opportunity to leverage Shop Floor to find a Shop Floor barcode for Warehouse Insight, but before any results have been set.

##### [IntegrationEvent(False,False)]

```
procedure OnSuccessfullShopFloorBarcodeBeforeFindProdOrderLine(psBarcode: Text, var precBarcodeRule: Record "IWX Barcode Rule", var precSFIBarcode: Record "SFI Barcode Entry", var precProdOrderLine: Record "Prod. Order Line", var precProdRtngLine: Record "Prod. Order Routing Line", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| psBarcode | _Text_ | The barcode as received. |
| precBarcodeRule | _Record “IWX Barcode Rule”_ | The barcode rule being handled |
| precSFIBarcode | _Record “SFI Barcode Entry”_ | The Shop Floor barcode entry with context key 1,2,3 results being set |
| precProdOrderLine | _Record “Prod. Order Line”_ | The production order line reference |
| precProdRtngLine | _Record “Prod. Order Routing Line”_ | The barcode as received. |
| pbHandled | _Boolean_ | Set to true to skip Shop Floor’s native integration |

#### OnAfterShopFloorBarcode

A Shop Floor barcode has been processed; however, a prod order line may or may not have been found.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterShopFloorBarcode(psBarcode: Text, var precBarcodeRule: Record "IWX Barcode Rule", var precSFIBarcode: Record "SFI Barcode Entry", var precProdOrderLine: Record "Prod. Order Line", var precProdRtngLine: Record "Prod. Order Routing Line")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| psBarcode | _Text_ | The barcode as received. |
| precBarcodeRule | _Record “IWX Barcode Rule”_ | The barcode rule being handled |
| precSFIBarcode | _Record “SFI Barcode Entry”_ | The Shop Floor barcode entry with context key 1,2,3 results being set |
| precProdOrderLine | _Record “Prod. Order Line”_ | The production order line reference |
| precProdRtngLine | _Record “Prod. Order Routing Line”_ | The barcode as received. |

#### OnBeforeCreateLicensePlate

Triggered when Shop Floor Insight decides to create a new license plate. Set pbHandled to true replace Shop Floor behavior. Keep pbHandled false to just run your code prior to Shop Floor creating a license plate.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeCreateLicensePlate(var ptxtLicensePlateIn: Text, var precTimeCard: Record "SFI Time Card Header", var precConfig: Record "SFI Client Configuration", var precInProdOrderLine: Record "Prod. Order Line", var precLPHeader: Record "IWX LP Header", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtLicensePlateIn | _Text_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precInProdOrderLine | _Record “Prod. Order Line”_ |  |
| precLPHeader | _Record “IWX LP Header”_ |  |
| pbHandled | _Boolean_ |  |

#### OnBeforeGetOrCreateLicensePlateForProdOrderLine

Use this event if you need to change the behavior of when to get or create a license plate. Note: the hardcoded text of ‘NEW’ will be used to denote a request for a new license plate. When overriding, make sure to consider this specific scenario.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeGetOrCreateLicensePlateForProdOrderLine(var ptxtLicensePlateIn: Text, var precTimeCard: Record "SFI Time Card Header", var precConfig: Record "SFI Client Configuration", var precInProdOrderLine: Record "Prod. Order Line", var precLPHeader: Record "IWX LP Header", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtLicensePlateIn | _Text_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precInProdOrderLine | _Record “Prod. Order Line”_ |  |
| precLPHeader | _Record “IWX LP Header”_ |  |
| pbHandled | _Boolean_ |  |

#### OnAfterCreateLicensePlate

Triggered when Shop Floor Insight has created a new license plate. The contents of the license plate will not yet be populated.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterCreateLicensePlate(var ptxtLicensePlateIn: Text, var precTimeCard: Record "SFI Time Card Header", var precConfig: Record "SFI Client Configuration", var precInProdOrderLine: Record "Prod. Order Line", var precLPHeader: Record "IWX LP Header")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtLicensePlateIn | _Text_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precInProdOrderLine | _Record “Prod. Order Line”_ |  |
| precLPHeader | _Record “IWX LP Header”_ |  |

#### OnBeforeRecordOutputOnLicensePlate

Called before recording output to a license plate has occurred. The output journal line will have already been created. “SFI License Plate No.” on the item journal line will have set and defines the license plate involved. Check the configuration of the “License Plate Output Mode” setting on the client configuration. This is called even if the output mode is set to warehouse insight.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeRecordOutputOnLicensePlate(var precConfig: Record "SFI Client Configuration", var precInOutItemJournalLine: Record "Item Journal Line", ptxtLotNo: Text, ptxtSerialNo: Text, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precInOutItemJournalLine | _Record “Item Journal Line”_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| pbHandled | _Boolean_ |  |

#### OnAfterRecordOutputOnLicensePlate

Called after output has been recorded to a license plate. The output journal line will have already been created. “SFI License Plate No.” on the item journal line will have set and defines the license plate involved. If the license plate output mode defined on the client configuration is set to WarehouseInsight then LPM License Plate No. will be set on the output journal line instead (flagging Warehouse Insight to handle output license plate posting) and this event will not be called in that circumstance.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterRecordOutputOnLicensePlate(var precConfig: Record "SFI Client Configuration", var precInOutItemJournalLine: Record "Item Journal Line", ptxtLotNo: Text, ptxtSerialNo: Text, var precLPHeader: Record "IWX LP Header", var precLPLine: Record "IWX LP Line")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precInOutItemJournalLine | _Record “Item Journal Line”_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| precLPHeader | _Record “IWX LP Header”_ |  |
| precLPLine | _Record “IWX LP Line”_ |  |

#### OnBeforeHandleBarcodeScan

This occurs before any decoding has been done, and before any barcode handling has occurred. Decoding has not yet occurred. You can use this an an opportunity to replace the barcode itself, or as an opportunity to completely replace the barcode scanning logic in Shop Floor Insight. Use the precActionResponse.GetInput methods to get other input details.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeHandleBarcodeScan(var precActionResponse: Record "SFI Action Response Buffer", var ptxtBarcode: Text, var ptxtScannedFromLocation: Text, var pbEventHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| ptxtBarcode | _Text_ |  |
| ptxtScannedFromLocation | _Text_ |  |
| pbEventHandled | _Boolean_ |  |

#### OnHandleBarcodeScan

Occurs during a barcode scan sequence, after the barcode has been decoded and analyzed, but before any action has been taken with that decoded the barcode. The time card, employee, client config, and input time card line (if applicable) will have been supplied. Use the precActionResponse.GetInput methods to get other input details.

##### [IntegrationEvent(False,False)]

```
procedure OnHandleBarcodeScan(var precActionResponse: Record "SFI Action Response Buffer", var ptxtBarcode: Text, var ptxtScannedFromLocation: Text, var precBarcode: Record "SFI Barcode Entry", var precConfig: Record "SFI Client Configuration", var precTimeCard: Record "SFI Time Card Header", var precEmployee: Record "SFI Employee", var pbEventHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| ptxtBarcode | _Text_ |  |
| ptxtScannedFromLocation | _Text_ |  |
| precBarcode | _Record “SFI Barcode Entry”_ | The Shop Floor barcode entry record as a result of the decoding. |
| precConfig | _Record “SFI Client Configuration”_ | a reference to the last configuration at the time the barcode was scanned. Important: this is the config at the time the barcode was scanned. |
| precTimeCard | _Record “SFI Time Card Header”_ | a reference to the last time card at the time the barcode was scanned. Important: this is the config at the time the barcode was scanned. |
| precEmployee | _Record “SFI Employee”_ | a reference to the last employee at the time the barcode was scanned. Important: this is the config at the time the barcode was scanned. |
| pbEventHandled | _Boolean_ | set to true to override the base Shop Floor behavior |

#### OnAfterHandleBarcodeScan

Occurs after a barcode has been handled, and after Shop Floor determines has taken action on that barcode (for example employee scan in/out, clocking in/out of a task, etc…)

##### [IntegrationEvent(False,False)]

```
procedure OnAfterHandleBarcodeScan(pbDidSFIDoAnythingWithThis: Boolean, var precActionResponse: Record "SFI Action Response Buffer", var ptxtBarcode: Text, var ptxtScannedFromLocation: Text, var precBarcode: Record "SFI Barcode Entry", var precConfig: Record "SFI Client Configuration", var precTimeCard: Record "SFI Time Card Header", var precEmployee: Record "SFI Employee")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pbDidSFIDoAnythingWithThis | _Boolean_ | This is set to true if anything handled it yet. |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| ptxtBarcode | _Text_ | This is set to true if anything handled it yet. |
| ptxtScannedFromLocation | _Text_ | This is set to true if anything handled it yet. |
| precBarcode | _Record “SFI Barcode Entry”_ |  |
| precConfig | _Record “SFI Client Configuration”_ | a reference to the configuration. Important: this can change from the input configuration after the handling occurs |
| precTimeCard | _Record “SFI Time Card Header”_ | a reference to the last time card. Important: this can change from the input configuration after the handling occurs |
| precEmployee | _Record “SFI Employee”_ | a reference to the last employee. Important: this can change from the input configuration after the handling occurs |

#### OnBeforeStartWorkflowFromShopFloorClient

Occurs before any shop floor workflow is started. This includes custom action barcodes, clocking in/out from the shop floor, before starting consumption, and more. This gives an opportunity to completely replace or extend handling of any workflow started from the shop floor client.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeStartWorkflowFromShopFloorClient(ptxtWorkflowToStart: Text, var precActionResponse: Record "SFI Action Response Buffer", var precConfig: Record "SFI Client Configuration", var precEmployee: Record "SFI Employee", var precTimeCard: Record "SFI Time Card Header", var precTimeCardLine: Record "SFI Time Card Line", var precBarcode: Record "SFI Barcode Entry", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtWorkflowToStart | _Text_ |  |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precConfig | _Record “SFI Client Configuration”_ | The active configuration. |
| precEmployee | _Record “SFI Employee”_ | The active employee |
| precTimeCard | _Record “SFI Time Card Header”_ | The active time card |
| precTimeCardLine | _Record “SFI Time Card Line”_ | The active time card line _if available_ |
| precBarcode | _Record “SFI Barcode Entry”_ | The active barcode _if available_ |
| pbHandled | _Boolean_ | set to true to override base Shop Floor behavior. |

#### OnAfterStartWorkflowFromShopFloorClient

Occurs after the workflow is handled by Shop Floor. This includes custom action barcodes, clocking in/out from the shop floor, before starting consumption, etc…

##### [IntegrationEvent(False,False)]

```
procedure OnAfterStartWorkflowFromShopFloorClient(ptxtWorkflowToStart: Text, var precActionResponse: Record "SFI Action Response Buffer", var precConfig: Record "SFI Client Configuration", var precEmployee: Record "SFI Employee", var precTimeCard: Record "SFI Time Card Header", var precTimeCardLine: Record "SFI Time Card Line", var precBarcode: Record "SFI Barcode Entry")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtWorkflowToStart | _Text_ |  |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precConfig | _Record “SFI Client Configuration”_ | The active configuration. |
| precEmployee | _Record “SFI Employee”_ | The active employee |
| precTimeCard | _Record “SFI Time Card Header”_ | The active time card |
| precTimeCardLine | _Record “SFI Time Card Line”_ | The active time card line _if available_ |
| precBarcode | _Record “SFI Barcode Entry”_ | The active barcode _if available_ |

#### OnBeforeHandleServerAction

Occurs before Shop Floor handles server actions. Server actions are most actions that occur from the shop floor, such as scanning barcodes. Note: This will get called when Shop Floor Insight is configured as the default server action handler. (codeunit 23044138 “SFI Action Handler” is the default server action handler) If a different server action handler has been configured in Shop Floor Setup, then this event will not get called. Using this event is an alternative to changing the default server action handler on the Shop Floor Setup. If you set pbHandled to true to replace, then you must preface all responses with precActionResponse.AddNoOpResponse() as your first response. If you set pbHandled to false then the default logic will occur, and this gives you an opportunity to change the input data before the server action is performed.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeHandleServerAction(var precActionResponse: Record "SFI Action Response Buffer", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| pbHandled | _Boolean_ |  |

#### OnAfterHandleServerAction

Occurs after Shop Floor handles server actions. Note: This will get called with Shop Floor is the default server action handler. If a different server action handler has been configured in Shop Floor Setup, then this event will not get called. Use this to add additional responses in addition to what the default behavior supplies.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterHandleServerAction(var precActionResponse: Record "SFI Action Response Buffer")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |

#### OnBeforeHandleMenu

Occurs before a server side menu item is handled. This includes custom menus defined in workflows. Menu actions would include clicking output, consumption, clocking in, clocking out.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeHandleMenu(var precActionResponse: Record "SFI Action Response Buffer", var ptxtMenuItem: Text, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| ptxtMenuItem | _Text_ |  |
| pbHandled | _Boolean_ |  |

#### OnAfterHandleMenu

Occurs after a server side menu item is handled. This includes custom menus defined in workflows.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterHandleMenu(var precActionResponse: Record "SFI Action Response Buffer", var ptxtMenuItem: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| ptxtMenuItem | _Text_ |  |

#### OnBeforeClockOnWithBarcodeData

Occurs before a clock on event occurs from the Shop Floor. This also occurs even when manually clocking on with a dispatch list, the barcode data record will just be simulated in that scenario. You can completely replace clocking on logic by setting pbHandled to true. If you want to perform additional validation prior to clocking on, then you can use this event and set pbHandled to false.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeClockOnWithBarcodeData(var precActionResponse: Record "SFI Action Response Buffer", precConfig: Record "SFI Client Configuration", precEmployee: Record "SFI Employee", precTimeCard: Record "SFI Time Card Header", precBarcodeData: Record "SFI Barcode Entry", var precMatchingLine: Record "SFI Time Card Line", var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precEmployee | _Record “SFI Employee”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precBarcodeData | _Record “SFI Barcode Entry”_ |  |
| precMatchingLine | _Record “SFI Time Card Line”_ |  |
| pbHandled | _Boolean_ | set to true to override Shop Floor behavior. |

#### OnAfterClockOnWithBarcodeData

Occurs after Shop Floor clock on event occurs. This will occur after all handling such as closing previous lines if needed, after any auto-splits from earlier lines, and after any new time card lines have been made. If you are clocking into multiple lines at once, then precMatchingLine will represent the last line that was clocked into.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterClockOnWithBarcodeData(var precActionResponse: Record "SFI Action Response Buffer", precConfig: Record "SFI Client Configuration", precEmployee: Record "SFI Employee", precTimeCard: Record "SFI Time Card Header", precBarcodeData: Record "SFI Barcode Entry", var precMatchingLine: Record "SFI Time Card Line")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precEmployee | _Record “SFI Employee”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precBarcodeData | _Record “SFI Barcode Entry”_ |  |
| precMatchingLine | _Record “SFI Time Card Line”_ |  |

#### OnBeforeClockOff

Occurs before a clock off on the line occurs. Use this to perform any additional validation prior to clocking off. The clock off time will not yet be set at this point. No auto-splits will have yet occurred.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeClockOff(precTimeCardLine: Record "SFI Time Card Line", pbForceAutoCalc: Boolean, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| pbForceAutoCalc | _Boolean_ |  |
| pbHandled | _Boolean_ |  |

#### OnAfterClockOff

Occurs after a clock off on the line occurs. The time card line will have the run time or setup time defined, in addition to setting the entry clock-off time. If multiple lines are involved they will all be clocked off as well.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterClockOff(precTimeCardLine: Record "SFI Time Card Line", pbForceAutoCalc: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| pbForceAutoCalc | _Boolean_ |  |

#### OnBeforeClockOffMultipleLines

Occurs before multiple lines are clocked off at once. This is typically in the scenario of an auto-split. In this scenario precMultipleLines will have filters representing all of the lines that are expected to be clocked off. If you want to change the lines to clock off, change the filters on this record. At this point, no line will have yet been clocked off.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeClockOffMultipleLines(var precActionResponse: Record "SFI Action Response Buffer", precTimeCard: Record "SFI Time Card Header", var precMultipleLines: Record "SFI Time Card Line", pbAddResponse: Boolean, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ | the time card |
| precMultipleLines | _Record “SFI Time Card Line”_ | the set of lines |
| pbAddResponse | _Boolean_ | whether a response should be added to the server response |
| pbHandled | _Boolean_ | set to true to override base SFI |

#### OnAfterClockOffMultipleLines

Occurs after multiple lines are clocked off at once. All lines in precMultipleLines are expected to have been altered at this point. Only the last line will be the selected line in the response.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterClockOffMultipleLines(var precActionResponse: Record "SFI Action Response Buffer", precTimeCard: Record "SFI Time Card Header", var precMultipleLines: Record "SFI Time Card Line", pbAddResponse: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precMultipleLines | _Record “SFI Time Card Line”_ |  |
| pbAddResponse | _Boolean_ |  |

#### OnBeforeGetQualityInspectionTargetFromTimeCardLine

Only used with Quality Inspector integration. Use this to replace the built-in behavior of finding the quality inspection target record based on the time card line. This gives an opportunity to change the target record to search. If setting pbHandled to true then you are replacing all logic. However, if you set rbSuccess to true, then you are indicating that you have found the ideal record, and you must supply that record in precRefOutFoundTarget.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeGetQualityInspectionTargetFromTimeCardLine(pcodTimeCardNo: Code[20], piTimeCardLineNo: Integer, var precRefOutFoundTarget: RecordRef, var rbSuccess: Boolean, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodTimeCardNo | _Code[20]_ |  |
| piTimeCardLineNo | _Integer_ |  |
| precRefOutFoundTarget | _RecordRef_ |  |
| rbSuccess | _Boolean_ |  |
| pbHandled | _Boolean_ | Set to true to replace the base Shop Floor Insight behavior, set to false to extend it. |

#### OnAfterGetQualityInspectionTargetFromTimeCardLine

Use this to extend the built in behavior of finding the quality inspection target from a time card line. If rbSuccess is true that means that a target record was found. Default behavior for the document type: production order = prod. order routing line. job = job task service = service item line blank = shop floor activity fixed asset = fixed asset record.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterGetQualityInspectionTargetFromTimeCardLine(pcodTimeCardNo: Code[20], piTimeCardLineNo: Integer, var precRefOutFoundTarget: RecordRef, var rbSuccess: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodTimeCardNo | _Code[20]_ |  |
| piTimeCardLineNo | _Integer_ |  |
| precRefOutFoundTarget | _RecordRef_ |  |
| rbSuccess | _Boolean_ |  |

#### OnCustomRecordOutputToLicensePlateFindExistingLine

Use this if you have extended the enum “SFI Output To LP Mode” and need to alter the behavior of how output is recorded to a license plate. By default, “Always New” will create a new lp line all the time. “Match Item and Tracking” will search for an existing license plate line that matches the same item, lot, serial, and uom. “Match Prod Order Line” will act like “Match Item and Tracking” but must also match the same prod orde and prod order line. Any enum extensions on “SFI Output To LP Mode” will end up calling OnCustomRecordOutputToLicensePlateFindExistingLine.

##### [IntegrationEvent(False,False)]

```
procedure OnCustomRecordOutputToLicensePlateFindExistingLine(var precConfig: Record "SFI Client Configuration", var precInOutItemJournalLine: Record "Item Journal Line", ptxtLotNo: Text, ptxtSerialNo: Text, var precLPLine: Record "IWX LP Line", var pbCreateNewLPLine: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precInOutItemJournalLine | _Record “Item Journal Line”_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| precLPLine | _Record “IWX LP Line”_ |  |
| pbCreateNewLPLine | _Boolean_ |  |

#### OnBeforeEndShift

Provides an opportunity to handle custom code before an end shift occurs. Set pbHandled to true to replace the built-in logic completely. Set pbHandled to false if you just want to run additional checks or validation prior to an end shift occurring. At this point the entry clock off time on the header has not been set, and the last time card line (if still clocked in) will not yet have been clocked off. If the employee was flagged as on-site they will not yet be flagged on-site.

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeEndShift(var pcodTimeCardNo: Code[20], var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodTimeCardNo | _Code[20]_ |  |
| pbHandled | _Boolean_ | Set to true to replace product code. Set to false to extend product code. |

#### OnAfterEndShift

Provides an opportunity to handle custom code after an end shift occurs. At this point:

- The last time card line will have been clocked off if it was left open.
- The employee will be flagged as off-site.
- The client config no. will be cleared.
- The preparation logic will have run.
- If there was a workflow for when a time card was closed it will have started
- The time card ‘open’ flag will be set to false.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterEndShift(pcodTimeCardNo: Code[20], precTimeCardHeader: Record "SFI Time Card Header")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodTimeCardNo | _Code[20]_ |  |
| precTimeCardHeader | _Record “SFI Time Card Header”_ |  |

#### OnBeforeHandleCustomMenuClicked

Use this as an opportunity to have custom code handled for custom workflows instead of custom workflow configuration. This gets called before the custom menu workflow has started. To get access to the input time card, employee, client config, and input time card line then you can use:

- precActionResponse.GetInputTimeCardRecord
- precActionResponse.GetInputEmployeeRecord
- precActionResponse.GetInputClientConfigRecord

##### [IntegrationEvent(False,False)]

```
procedure OnBeforeHandleCustomMenuClicked(ptxtCustomMenuWorkflow: Text, var precActionResponse: Record "SFI Action Response Buffer", var precTimeCard: Record "SFI Time Card Header", var pbMenuWasHandled: Boolean, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtCustomMenuWorkflow | _Text_ |  |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| pbMenuWasHandled | _Boolean_ |  |
| pbHandled | _Boolean_ |  |

#### OnAfterHandleCustomMenuClicked

Use this as an opportunity to extend custom menu-based workflows.

##### [IntegrationEvent(False,False)]

```
procedure OnAfterHandleCustomMenuClicked(ptxtCustomMenuWorkflow: Text, var precActionResponse: Record "SFI Action Response Buffer", var precTimeCard: Record "SFI Time Card Header", var pbMenuWasHandled: Boolean, precActiveSFITimeCardHeader: Record "SFI Time Card Header", precSFIEmployee: Record "SFI Employee", precSFIClientConfiguration: Record "SFI Client Configuration", precSelectedSFITimeCardHeader: Record "SFI Time Card Line")
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtCustomMenuWorkflow | _Text_ |  |
| precActionResponse | _Record “SFI Action Response Buffer”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| pbMenuWasHandled | _Boolean_ |  |
| precActiveSFITimeCardHeader | _Record “SFI Time Card Header”_ |  |
| precSFIEmployee | _Record “SFI Employee”_ |  |
| precSFIClientConfiguration | _Record “SFI Client Configuration”_ |  |
| precSelectedSFITimeCardHeader | _Record “SFI Time Card Line”_ |  |

#### OnShopFloorQualityScreenClosed

Occurs when the Quality Inspection screen has closed on the Shop Floor Client.

##### [IntegrationEvent(False,False)]

```
internal procedure OnShopFloorQualityScreenClosed(ptxtConfigNo: Text, ptxtEmployeeNo: Text, ptxtInputScreenNo: Text, ptxtAddress: Text, ptxtCurrentTimeCardNo: Text, ptxtSelectedRowKey1: Text, ptxtSelectedRowKey2: Text, ptxtSelectedRowKey3: Text, ptxtLotNo: Text, ptxtSerialNo: Text, var precIWXQITest: Record "IWX QI Test", var ptxtOut: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtConfigNo | _Text_ |  |
| ptxtEmployeeNo | _Text_ |  |
| ptxtInputScreenNo | _Text_ |  |
| ptxtAddress | _Text_ |  |
| ptxtCurrentTimeCardNo | _Text_ |  |
| ptxtSelectedRowKey1 | _Text_ |  |
| ptxtSelectedRowKey2 | _Text_ |  |
| ptxtSelectedRowKey3 | _Text_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| precIWXQITest | _Record “IWX QI Test”_ |  |
| ptxtOut | _Text_ |  |

#### OnBeforeShopFloorQualityFinishTest

Occurs when the Quality Inspection screen has its finish button clicked.

##### [IntegrationEvent(False,False)]

```
internal procedure OnBeforeShopFloorQualityFinishTest(ptxtConfigNo: Text, ptxtEmployeeNo: Text, ptxtInputScreenNo: Text, ptxtAddress: Text, ptxtCurrentTimeCardNo: Text, ptxtSelectedRowKey1: Text, ptxtSelectedRowKey2: Text, ptxtSelectedRowKey3: Text, ptxtLotNo: Text, ptxtSerialNo: Text, var pbHandled: Boolean, var rtxtOut: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtConfigNo | _Text_ |  |
| ptxtEmployeeNo | _Text_ |  |
| ptxtInputScreenNo | _Text_ |  |
| ptxtAddress | _Text_ |  |
| ptxtCurrentTimeCardNo | _Text_ |  |
| ptxtSelectedRowKey1 | _Text_ |  |
| ptxtSelectedRowKey2 | _Text_ |  |
| ptxtSelectedRowKey3 | _Text_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| pbHandled | _Boolean_ |  |
| rtxtOut | _Text_ |  |

#### OnAfterShopFloorQualityFinishTest

Occurs when the Quality Inspection screen has its Finish button clicked after the test has finished.

##### [IntegrationEvent(False,False)]

```
internal procedure OnAfterShopFloorQualityFinishTest(ptxtConfigNo: Text, ptxtEmployeeNo: Text, ptxtInputScreenNo: Text, ptxtAddress: Text, ptxtCurrentTimeCardNo: Text, ptxtSelectedRowKey1: Text, ptxtSelectedRowKey2: Text, ptxtSelectedRowKey3: Text, ptxtLotNo: Text, ptxtSerialNo: Text, var precIWXQITest: Record "IWX QI Test", var rtxtOut: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtConfigNo | _Text_ |  |
| ptxtEmployeeNo | _Text_ |  |
| ptxtInputScreenNo | _Text_ |  |
| ptxtAddress | _Text_ |  |
| ptxtCurrentTimeCardNo | _Text_ |  |
| ptxtSelectedRowKey1 | _Text_ |  |
| ptxtSelectedRowKey2 | _Text_ |  |
| ptxtSelectedRowKey3 | _Text_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| precIWXQITest | _Record “IWX QI Test”_ |  |
| rtxtOut | _Text_ |  |

#### OnBeforeShopFloorQualityReOpenTest

Occurs when the Quality Inspection screen has its Finish button clicked.

##### [IntegrationEvent(False,False)]

```
internal procedure OnBeforeShopFloorQualityReOpenTest(ptxtConfigNo: Text, ptxtEmployeeNo: Text, ptxtInputScreenNo: Text, ptxtAddress: Text, ptxtCurrentTimeCardNo: Text, ptxtSelectedRowKey1: Text, ptxtSelectedRowKey2: Text, ptxtSelectedRowKey3: Text, ptxtLotNo: Text, ptxtSerialNo: Text, var pbHandled: Boolean, var rtxtOut: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtConfigNo | _Text_ |  |
| ptxtEmployeeNo | _Text_ |  |
| ptxtInputScreenNo | _Text_ |  |
| ptxtAddress | _Text_ |  |
| ptxtCurrentTimeCardNo | _Text_ |  |
| ptxtSelectedRowKey1 | _Text_ |  |
| ptxtSelectedRowKey2 | _Text_ |  |
| ptxtSelectedRowKey3 | _Text_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| pbHandled | _Boolean_ |  |
| rtxtOut | _Text_ |  |

#### OnAfterShopFloorQualityReOpenTest

Occurs when the Quality Inspection screen has its Finish button clicked after the test has finished.

##### [IntegrationEvent(False,False)]

```
internal procedure OnAfterShopFloorQualityReOpenTest(ptxtConfigNo: Text, ptxtEmployeeNo: Text, ptxtInputScreenNo: Text, ptxtAddress: Text, ptxtCurrentTimeCardNo: Text, ptxtSelectedRowKey1: Text, ptxtSelectedRowKey2: Text, ptxtSelectedRowKey3: Text, ptxtLotNo: Text, ptxtSerialNo: Text, var precIWXQITest: Record "IWX QI Test", var rtxtOut: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtConfigNo | _Text_ |  |
| ptxtEmployeeNo | _Text_ |  |
| ptxtInputScreenNo | _Text_ |  |
| ptxtAddress | _Text_ |  |
| ptxtCurrentTimeCardNo | _Text_ |  |
| ptxtSelectedRowKey1 | _Text_ |  |
| ptxtSelectedRowKey2 | _Text_ |  |
| ptxtSelectedRowKey3 | _Text_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| precIWXQITest | _Record “IWX QI Test”_ |  |
| rtxtOut | _Text_ |  |

#### OnBeforeShopFloorQualityCreateReTest

Occurs when the Quality Inspection screen has its Finish button clicked.

##### [IntegrationEvent(False,False)]

```
internal procedure OnBeforeShopFloorQualityCreateReTest(ptxtConfigNo: Text, ptxtEmployeeNo: Text, ptxtInputScreenNo: Text, ptxtAddress: Text, ptxtCurrentTimeCardNo: Text, ptxtSelectedRowKey1: Text, ptxtSelectedRowKey2: Text, ptxtSelectedRowKey3: Text, ptxtLotNo: Text, ptxtSerialNo: Text, var pbHandled: Boolean, var rtxtOut: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtConfigNo | _Text_ |  |
| ptxtEmployeeNo | _Text_ |  |
| ptxtInputScreenNo | _Text_ |  |
| ptxtAddress | _Text_ |  |
| ptxtCurrentTimeCardNo | _Text_ |  |
| ptxtSelectedRowKey1 | _Text_ |  |
| ptxtSelectedRowKey2 | _Text_ |  |
| ptxtSelectedRowKey3 | _Text_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| pbHandled | _Boolean_ |  |
| rtxtOut | _Text_ |  |

#### OnAfterShopFloorQualityCreateReTest

Occurs when the Quality Inspection screen has its Finish button clicked after the test has finished.

##### [IntegrationEvent(False,False)]

```
internal procedure OnAfterShopFloorQualityCreateReTest(ptxtConfigNo: Text, ptxtEmployeeNo: Text, ptxtInputScreenNo: Text, ptxtAddress: Text, ptxtCurrentTimeCardNo: Text, ptxtSelectedRowKey1: Text, ptxtSelectedRowKey2: Text, ptxtSelectedRowKey3: Text, ptxtLotNo: Text, ptxtSerialNo: Text, var precOriginalIWXQITest: Record "IWX QI Test", var precNewlyCreatedIWXQITest: Record "IWX QI Test", var rtxtOut: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| ptxtConfigNo | _Text_ |  |
| ptxtEmployeeNo | _Text_ |  |
| ptxtInputScreenNo | _Text_ |  |
| ptxtAddress | _Text_ |  |
| ptxtCurrentTimeCardNo | _Text_ |  |
| ptxtSelectedRowKey1 | _Text_ |  |
| ptxtSelectedRowKey2 | _Text_ |  |
| ptxtSelectedRowKey3 | _Text_ |  |
| ptxtLotNo | _Text_ |  |
| ptxtSerialNo | _Text_ |  |
| precOriginalIWXQITest | _Record “IWX QI Test”_ |  |
| precNewlyCreatedIWXQITest | _Record “IWX QI Test”_ |  |
| rtxtOut | _Text_ |  |

#### OnProdOrderPartialItemBarcodeBeforeProdOrderLineFind

Use OnProdOrderPartialItemBarcodeBeforeProdOrderLineFind to alter or customize the behavior of item or barcoderule based scans that restrict the prod order routing lines, which in turn are used to determine which prod order lines and routings should be clocked on.

##### [IntegrationEvent(False,False)]

```
internal procedure OnProdOrderPartialItemBarcodeBeforeProdOrderLineFind(var precConfig: Record "SFI Client Configuration", var precItem: Record Item, var precBarcodeRuleResult: Record "IWX Barcode Rule", var precProdOrderLines: Record "Prod. Order Line", var precProdRtngLine: Record "Prod. Order Routing Line", var ptrecOutProdRtngLine: Record "Prod. Order Routing Line" temporary, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precItem | _Record Item_ |  |
| precBarcodeRuleResult | _Record “IWX Barcode Rule”_ |  |
| precProdOrderLines | _Record “Prod. Order Line”_ |  |
| precProdRtngLine | _Record “Prod. Order Routing Line”_ |  |
| ptrecOutProdRtngLine | _Record “Prod. Order Routing Line” temporary_ |  |
| pbHandled | _Boolean_ |  |

#### OnProdOrderPartialItemBarcodeBeforeAddMatch

Use this to make a case-by-case decision on whether to add a prod order routing line as a match when scanning an item or barcode rule based barcode to determine which prod order routing line should be used to clock in.

##### [IntegrationEvent(False,False)]

```
internal procedure OnProdOrderPartialItemBarcodeBeforeAddMatch(var precConfig: Record "SFI Client Configuration", var precItem: Record Item, var precBarcodeRuleResult: Record "IWX Barcode Rule", var precProdOrderLines: Record "Prod. Order Line", var precProdRtngLine: Record "Prod. Order Routing Line", var ptrecOutProdRtngLine: Record "Prod. Order Routing Line" temporary, var pbAdd: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precConfig | _Record “SFI Client Configuration”_ |  |
| precItem | _Record Item_ |  |
| precBarcodeRuleResult | _Record “IWX Barcode Rule”_ |  |
| precProdOrderLines | _Record “Prod. Order Line”_ |  |
| precProdRtngLine | _Record “Prod. Order Routing Line”_ |  |
| ptrecOutProdRtngLine | _Record “Prod. Order Routing Line” temporary_ |  |
| pbAdd | _Boolean_ |  |

#### OnBeforeAddWorkInstructions

Use this to replace the entire work instructions datasets with custom data.

##### [IntegrationEvent(False,False)]

```
internal procedure OnBeforeAddWorkInstructions(var precProdOrderLine: Record "Prod. Order Line", var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precCapacityLedger: Record "Capacity Ledger Entry", var precTimeCard: Record "SFI Time Card Header", var precTimeCardLine: Record "SFI Time Card Line", var ptrecProdRtngCommentLine: Record "Prod. Order Rtng Comment Line" temporary, var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precProdOrderLine | _Record “Prod. Order Line”_ |  |
| precProdOrderRoutingLine | _Record “Prod. Order Routing Line”_ |  |
| precCapacityLedger | _Record “Capacity Ledger Entry”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| ptrecProdRtngCommentLine | _Record “Prod. Order Rtng Comment Line” temporary_ | This is the global record that contains the comments |
| pbHandled | _Boolean_ | Set true to indicated custom data was supplied |

#### OnAddWorkInstruction

Use OnAfterAddWorkInstructions if you just want to add more work instructions. Use OnAddWorkInstruction if you want to curate any default text that is added into the work instructions panel.

##### [IntegrationEvent(False,False)]

```
internal procedure OnAddWorkInstruction(var precProdOrderLine: Record "Prod. Order Line", var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precCapacityLedger: Record "Capacity Ledger Entry", var precTimeCard: Record "SFI Time Card Header", var precTimeCardLine: Record "SFI Time Card Line", var ptrecProdRtngCommentLine: Record "Prod. Order Rtng Comment Line" temporary, var ptxtComment: Text)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precProdOrderLine | _Record “Prod. Order Line”_ |  |
| precProdOrderRoutingLine | _Record “Prod. Order Routing Line”_ |  |
| precCapacityLedger | _Record “Capacity Ledger Entry”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| ptrecProdRtngCommentLine | _Record “Prod. Order Rtng Comment Line” temporary_ | This is the global record that contains the comments |
| ptxtComment | _Text_ | This is the current text content being added as comments |

#### OnAfterAddWorkInstructions

Use this to add new comments with custom data after the default work instructions already exist. Add new text by adding new records to the temporary record ptrecProdRtngCommentLine.

##### [IntegrationEvent(False,False)]

```
internal procedure OnAfterAddWorkInstructions(var precProdOrderLine: Record "Prod. Order Line", var precProdOrderRoutingLine: Record "Prod. Order Routing Line", var precCapacityLedger: Record "Capacity Ledger Entry", var precTimeCard: Record "SFI Time Card Header", var precTimeCardLine: Record "SFI Time Card Line", var ptrecProdRtngCommentLine: Record "Prod. Order Rtng Comment Line" temporary)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| precProdOrderLine | _Record “Prod. Order Line”_ |  |
| precProdOrderRoutingLine | _Record “Prod. Order Routing Line”_ |  |
| precCapacityLedger | _Record “Capacity Ledger Entry”_ |  |
| precTimeCard | _Record “SFI Time Card Header”_ |  |
| precTimeCardLine | _Record “SFI Time Card Line”_ |  |
| ptrecProdRtngCommentLine | _Record “Prod. Order Rtng Comment Line” temporary_ | This is the global record that contains the comments |

#### OnBeforeSetQualityInspectorFromWebService

Gives extensions the ability to alter the user used for Shop Floor and Quality Inspector integration when Shop Floor needs to set the Quality Inspector’s inspector in the session.

##### [IntegrationEvent(False,False)]

```
internal procedure OnBeforeSetQualityInspectorFromWebService(var pcodUser: Code[50], var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodUser | _Code[50]_ |  |
| pbHandled | _Boolean_ |  |

#### OnBeforeGetQualityInspectorFromWebService

Gives extensions the ability to alter the user used for Shop Floor and Quality Inspector integration when Shop Floor needs to know the Quality Inspector inspector in the session. This can be used to help determine permissions allowed, whether a quality inspection test can be created, etc.

##### [IntegrationEvent(False,False)]

```
internal procedure OnBeforeGetQualityInspectorFromWebService(var pcodUser: Code[50], var pbHandled: Boolean)
```

##### Parameters

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| pcodUser | _Code[50]_ |  |
| pbHandled | _Boolean_ |  |
