Codeunit WSB_STMStatusMgt
Provides functionality for handling Status.
Properties
Methods
wgFncCheckMandatoryFields
Checks that the mandatory fields for the record are filled for a certain status.
Parameters
Type |
Name |
Description |
RecordRef |
pRecRef |
The record |
Code[10] |
pStatusCode |
The status code. |
wgFncCheckMandatoryFields
Checks that the mandatory fields for the record are filled for a certain status.
Parameters
Type |
Name |
Description |
RecordRef |
pRecRef |
The record |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The Applies-to Type for this record. |
Code[10] |
pStatusCode |
The status code. |
wgFncGetAppliesToType
Retrieves the Applies-to Type for a record.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The record. |
Returns
Type |
Description |
Enum WSB_STMStatusAppliesToType |
The Applies-to Type for the record. |
wgFncGetAppliesToType
Retrieves the Applies-to Type for a table.
Parameters
Type |
Name |
Description |
Integer |
pTableNo |
The Table No. |
Returns
Type |
Description |
Enum WSB_STMStatusAppliesToType |
The Applies-to Type for the table. |
wgFncGetAppliesToTypeDescription
Gets a description for the type of record a status applies to.
Parameters
Type |
Name |
Description |
Integer |
pTableNo |
Table No. |
Enum "WSB_STMDocumentType" |
pDocumentType |
Document Type |
Returns
Type |
Description |
Text |
The description. |
wgFncGetAppliesToTypeDescription
Gets a description for the type of record a status applies to.
Parameters
Type |
Name |
Description |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
Applies-to Type |
Enum "WSB_STMDocumentType" |
pDocumentType |
Document Type |
Returns
Type |
Description |
Text |
The description. |
wgFncGetNewStatus
Gets the new status code that would result from taking a certain action given a certain current status.
Parameters
Type |
Name |
Description |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
Applies-to Type. |
Enum "WSB_STMDocumentType" |
pDocumentType |
Document Type |
Code[10] |
pCurrentStatusCode |
Current Status Code |
Enum "WSB_STMStatusAction" |
pStatusAction |
Status Action |
Returns
Type |
Description |
Code[10] |
The new Status Code. |
wgFncGetNewStatus
Gets the new status code that would result from taking a certain action given a certain current status.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record to get the new status for. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
Applies-to Type. |
Enum "WSB_STMDocumentType" |
pDocumentType |
Document Type |
Code[10] |
pCurrentStatusCode |
Current Status Code |
Enum "WSB_STMStatusAction" |
pStatusAction |
Status Action |
Returns
Type |
Description |
Code[10] |
The new Status Code. |
wgFncIsStatusActionEnabled
Retrieves whether a status action is enabled in a status.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The record that we are dealing with. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
Applies-to Type |
Code[10] |
pStatusCode |
Status Code |
Enum "WSB_STMStatusAction" |
pStatusAction |
Status Action |
Returns
Type |
Description |
Boolean |
true iff the status action is enabled. |
wgFncIsStatusActionEnabled
Retrieves whether a status action is enabled in a status.
Parameters
Type |
Name |
Description |
Variant |
pRecRelatedVariant |
The record that we are dealing with. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
Applies-to Type |
Enum "WSB_STMDocumentType" |
pDocumentType |
Document Type |
Code[10] |
pStatusCode |
Status Code |
Enum "WSB_STMStatusAction" |
pStatusAction |
Status Action |
Returns
Type |
Description |
Boolean |
true iff the status action is enabled. |
Updates the status of a record taking a status action.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record. |
Enum "WSB_STMStatusAction" |
pAction |
The status action. |
Updates the status of a record taking a status action.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The Applies-to Type of the record. |
Enum "WSB_STMStatusAction" |
pAction |
The status action. |
Updates the status of a record taking a status action or using the status code.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The Applies-to Type of the record. |
Enum "WSB_STMStatusAction" |
pAction |
The status action. |
Code[10] |
pNewStatusCode |
The new status code. |
wgFncSetStatusFlowSetupFilters
Sets filters on a status flow setup record variable, i.e., to get the set of possible statuses that one can move to from a given status.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record that is being dealth with whose statuses needs to be changed. |
Integer |
pTableNo |
The table number of the entity/applies-to type that is being dealth with. |
Enum "WSB_STMDocumentType" |
pDocumentType |
The document type thatis being dealth with |
Code[10] |
pCurrentStatusCode |
The code of the current status. |
Enum "WSB_STMStatusFlowDirection" |
pDirection |
The status change direction. |
Record "WSB_STMStatusFlowSetup" |
vRecWSB_STMStatusFlowSetup |
The status flow setup record to which the filters should be applied. |
wlEvpOnAfterCheckMandatoryField
Allows to hook into the moment right after a mandatory field check is performed.
Parameters
Type |
Name |
Description |
FieldRef |
pFieldRef |
The mandatory field that is checked. |
Boolean |
vMandatoryFieldsMissing |
Whether any (previous) mandatory fields are missing. |
Text |
vMandatoryFieldsErrorsTxt |
The error message that is being built up to show which mandatory fields are missing, if any. |
wlEvpOnAfterCheckMandatoryFields
Allows one to hook into the moment right after mandatory fields are checked for a record while in a certain status.
Parameters
Type |
Name |
Description |
RecordRef |
pRecRef |
The record to check mandatory fields for. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The applies-to type for this record. |
Code[10] |
pStatusCode |
The status. |
wlEvpOnAfterGetNewStatus
Allows one to hook into the moment right after the new status is retrieved when a status change action is performed.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record to get the new status for. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The entity type that is currently dealt with. |
Enum "WSB_STMDocumentType" |
pDocumentType |
The document type that is currently dealt with, if applicable. |
Code[10] |
pCurrentStatusCode |
The current status code of the record. |
Enum "WSB_STMStatusAction" |
pStatusAction |
The status action that is being performed. |
Code[10] |
vNewStatusCode |
The resulting new status code. |
Allows one to hook into the moment after a status change is performed for a certain record.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record for which the status has been changed. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The Applies-to Type for this record. |
Enum "WSB_STMStatusAction" |
pAction |
The status action that was performed. |
Code[10] |
pOldStatusCode |
The old status code. |
Code[10] |
pNewStatusCode |
The new status code. |
wlEvpOnAfterSetStatusFlowSetupFilters
Allows one to hook into setting filters on a status flow setup record variable, i.e., to get the set of possible statuses that one can move to from a given status.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record that is being dealth with whose statuses needs to be changed. |
Integer |
pTableNo |
The table number of the entity/applies-to type that is being dealth with. |
Enum "WSB_STMDocumentType" |
pDocumentType |
The document type thatis being dealth with |
Code[10] |
pCurrentStatusCode |
The code of the current status. |
Enum "WSB_STMStatusFlowDirection" |
pDirection |
The status change direction. |
Record "WSB_STMStatusFlowSetup" |
vRecWSB_STMStatusFlowSetup |
The status flow setup record to which the filters should be applied. |
wlEvpOnBeforeCheckMandatoryField
Allows to hook into the moment right before a mandatory field check is performed.
Parameters
Type |
Name |
Description |
FieldRef |
pFieldRef |
The mandatory field that is checked. |
Boolean |
vMandatoryFieldsMissing |
Whether any (previous) mandatory fields are missing. |
Text |
vMandatoryFieldsErrorsTxt |
The error message that is being built up to show which mandatory fields are missing, if any. |
Boolean |
vIsHandled |
Set this parameter to true if your extension handles checking the mandatory field. |
wlEvpOnBeforeCheckMandatoryFields
Allows one to hook into the moment right before mandatory fields are checked for a record while in a certain status.
Parameters
Type |
Name |
Description |
RecordRef |
pRecRef |
The record to check mandatory fields for. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The applies-to type for this record. |
Code[10] |
pStatusCode |
The status. |
Boolean |
vIsHandled |
Set this variable to true if your extension handles checking mandatory fields for this case. |
wlEvpOnBeforeGetNewStatus
Allows one to hook into the moment right before the new status is retrieved when a status change action is performed.
Parameters
Type |
Name |
Description |
RecordRef |
vRecRef |
The record to get the new status for. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The entity type that is currently dealt with. |
Enum "WSB_STMDocumentType" |
pDocumentType |
The document type that is currently dealt with, if applicable. |
Code[10] |
pCurrentStatusCode |
The current status code of the record. |
Enum "WSB_STMStatusAction" |
pStatusAction |
The status action that is being performed. |
Code[10] |
vNewStatusCode |
The resulting new status code. |
Boolean |
vIsHandled |
Set this parameter to true if your extension handles retrieving the new status for this case. |
wlEvpOnBeforeSendMandatoryFieldNotification
Allows to hook into the moment right before sending a notification about a missing mandatory field.
Parameters
Type |
Name |
Description |
Text |
vMandatoryFieldNotificationMessage |
The notification that should be shown. |
Boolean |
vIsHandled |
Set this parameter to true if you would like to handle sending the notification for this mandatory field yourself, or if you would like to suppress the notification. |
wlEvpOnBeforeShowStatusChangeNotification
Allows to hook into the moment right before sending a notification about a status change for a record.
Parameters
Type |
Name |
Description |
RecordRef |
pRecRef |
The record we are dealing with. |
Enum "WSB_STMStatusAppliesToType" |
pAppliesToType |
The applies-to type. |
Enum "WSB_STMDocumentType" |
pDocumentType |
The document type. |
Code[10] |
pNewStatusCode |
The new status code. |
Boolean |
vIsHandled |
Set this parameter to true if you would like to handle sending the notification for this status change yourself, or if you would like to suppress the notification. |
Allows one to hook into the moment after a status change is performed for a certain record.
Parameters
Type |
Name |
Description |
Integer |
tableId |
The table id of the record for which the status has been changed. |
Guid |
systemId |
The system id of the record for which the status has been changed. |
Integer |
appliesToType |
The Applies-to Type as integer value for this record. |
Integer |
action |
The status action as integer value that was performed. |
Code[10] |
oldStatusCode |
The old status code. |
Code[10] |
newStatusCode |
The new status code. |