...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Info | ||
---|---|---|
| ||
|
Use this event to
Excerpt |
---|
Return extra steps based on already collected values. |
Description
You can use Whse. Inquiry to perform instant Online validationValidation of a steps input value.
Use this event to return extra steps based on already collected values.
Infonote |
---|
You may (optionally) validate the current steps value prior to returning new steps. In this case you must use the OnWhseInquiryOnCustomDocumentType event. |
...
set the includeCollectedValues property in application.cfg (see below). |
Template
// [Template]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Whse. Inquiry", 'OnWhseInquiry_OnAddSteps', '', true, true)]
local procedure OnWhseInquiry MyOnWhseInquiry_OnAddSteps(_DocumentType: Text; var _RequestValues: Record "MOB NS Request Element"; var _Steps: Record "MOB Steps ElementMOB Steps Element"; var _RegistrationTypeTracking: Text; var _IsHandled: Boolean)
begin
end;
Example
// [Example 1Example 1]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS WhseMOB WMS Whse. Inquiry Inquiry", 'OnWhseInquiry_OnAddSteps', '', true true, true true)]
local procedure Ex01 Ex01_OnWhseInquiry_OnAddSteps(_DocumentType: Text; var _RequestValues: Record "MOB NS Request ElementMOB NS Request Element"; var _Steps: Record "MOB Steps Element")
var
RequestValues: Record "MOB NS Request Element" temporary;
begin
case _DocumentType of
MOB Steps Element"; var _IsHandled: Boolean)
begin
case _DocumentType of
'ValidateMyLotNumber':
begin
begin
_Steps.Create_TextStep(10, 'MyTextStep1');
_Steps.Set_defaultValue('MyTextDefaultValue1');
_Steps.Set_header('MyTextStep1 MyTextStep1 - ' + _RequestValues.Get_LotNumber());
// Reading value from already collected step
_Steps.Create_TextStep(20, 'MyTextStep2');
_Steps.Set_defaultValue('MyTextDefaultValue2');
_Steps.Set_header('MyTextStep2');
exit_IsHandled := true;
end;
'ValidateMyQuantity':
begin
begin
_Steps.Create_TextStep(10, 'MyQtySteps1');
_Steps.Set_defaultValue('MyQtySteps1');
_Steps.Set_header('MyQtySteps1 MyQtySteps1 - ' + format Format(_RequestValues.Get_Quantity()));
// Reading value from already collected step
_Steps.Create_TextStep(20, 'MyQtySteps2');
_Steps.Set_defaultValue('MyQtySteps2');
_Steps.Set_header('MyQtySteps2');
exit_IsHandled := true;
end;
else
exit;
end;
end; end;
end;
Related change to application.cfg
Each new DocumentType to be validated must have a related change to a service-section in the application.cfg. In this example, the service for the Pick page is modified. For additional examples, see the links below.
Code Block | ||
---|---|---|
| ||
<service id="Pick" type="Order" orderType="Pick">
<requests>
<getOrders>GetPickOrders</getOrders>
<getOrderLines>GetPickOrderLines</getOrderLines>
<postOrder>PostPickOrder</postOrder>
</requests>
<validation>
<lotNumberValidation documentName="ValidateMyLotNumber" online="true" includeCollectedValues="true"/>
<quantityValidation documentName="ValidateMyQuantity" online="true" includeCollectedValues="true"/>
</validation>
</service> |
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Version History
Version | Changes |
---|---|
MOB5. |
34 | Introduced |
MOB5.36.xxx.208 | _IsHandled parameter added |