StocktakeItemPost [WCONTROL002]
DATASCOPE.SDK.BusinessObjects.WarehouseControl.StockTake.StocktakeItemPost()
This Business Object is used to Post a single Stock Take Item. It will replicate the functions of the HTML5 Stock Taking screen.
For a detailed overview on working with DATASCOPE PREMIUM WMS Business Objects, refer to E.Net Business Objects
If you don’t like reading, you can watch the video.
None
No Specification
RELEASE NOTES
Release notes 24R2 (Ticket # 8797) - StockTakeItemPost Business Object development.
Description
Post a single Stock Take Item
Code | WCONTROL002 |
---|---|
Name | StocktakeItemPost |
Module | WarehouseControl |
Functional Area | StockTake |
Name Space/Class | DATASCOPE.SDK.BusinessObjects.WarehouseControl.StockTake.StocktakeItemPost() |
Release Date | Aug 2024 |
Release Version | v24.2 |
Prerequisites | None |
---|---|
SYSPRO Objects | None |
Parameters
Name | Description | Mandatory field | Data Type | Default Value |
|
---|---|---|---|---|---|
pWarehouse | The warehouse that has an open StockTake - A valid Syspro Warehouse; A StockTake has been opened for the warehouse in Syspro | YES | string | <blank> | |
pBin | The bin being counted in the stock take - A valid Bin that exists in WMS | YES | string | <blank> | |
pEmptyBin | A bin can be counted as an 'Empty' bin, meaning no Track IDs or stock were found in it, the options for this property are Y or N. If set to Y, the bin will be marked as an empty bin, otherwise counted as per normal. | YES | string | <blank> | |
pTrackIDs | This is a List of Post items and must contain at least one item. | ||||
pTrackID | It is the TrackID found within the Bin | YES | String | <blank> | |
pStockCode | The stock code found on the TrackID | YES | String | <blank> | |
pLot | Lot Number applicable for the pStockCode. Only required if the pStockCode is flagged at Lot Traceable in SYSPRO. | NO | String | Required if pStockCode is Lot traceable, otherwise <blank> | |
pExpiryDate | Expiry Date for the pLot if the pStockCode is Lot Traceable and using Expiry Dates in SYSPRO. If pLot is Traceable and not supplied, No Expiry will be posted to SYSPRO and reflect at 0000/00/00 | NO | String | <blank> | |
pQuantity | The quantity of stock on the TrackID | YES | Decimal | 0 | |
pUOM | The UOM the qty has been captured in. If it is <blank> the default value stored in the System Setting (STOCKTAKE / DEFAULT_CAPTURE_UOM) will be used | NO | String | <blank> | |
|
|
|
|
|
|
Validation
There are a number of validations required for the input fields as listed below:
A valid Warehouse defined in SYSPRO is required.
The Stock Take should be open in SYSPRO for the applicable warehouse.
A valid Bin must be defined within SYSPRO and DATASCOPE WMS.
A valid Stock Code should exist.
The valid Stock Code should live in the warehouse being counted.
A valid Lot number if required.
A valid Expiry Date.
If an existing Lot has been supplied and an Expiry Date is either found in SYSPRO or DATASCOPE WMS, the data supplied is ignored and the existing expiry date is used.
A valid date format of yyyy-MM-dd
UOM - There are three valid options for UOM - STOCKING, ALTERNATE, OTHER - if none are supplied the default value under the Warehouse Setting DEFAULT_CAPTURE_UOM is used.
Additional information
Empty Bin - A Bin can be counted as an “Empty” bin, this means that no TrackID or Stock were found in it, and the options for this property are Y(es) or N(o).
If Y(es), then the Bin will be marked as an empty bin. Only the Warehouse and Bin will need to be passed through with this option.
If N(o), then the Bin will be counted as per normal.
All standard fields and rules should be applied when set to N(o).
If there is an existing count for the Bin/TrackID/Stock Code/Lot combination, and the user posts another count, the new count will replace the existing count.
Technical Details
The following Technical Specification is available.
The following technical details will need to be applied when writing this new business object:
As per the Designation this object is to be placed under the following location within the DATASCOPE WMS SDK Project. DATASCOPE.SDK.BusinessObjects.WarehouseControl.StockTake as shown below.
Functional Area class will be called StockTake.cs
Within the existing StockTake.cs file a new method should be created StockTakeItemPost, this will be the business object entry point definition and should be defined as follows:
public Response StockTakeItemPost(string p_GUID)
The return type will be of Response, this is the standard response type for all business objects and will be used by the 3rd party to determine if the process was a success or failure as well as any error message, the details will be covered later in this document
All business objects take a single Parameter within the function, called p_GUID, this is the GUID obtained by calling the standard DATASCOPE WMS Logon business Object.
The core code of the business object should be encapsulated within a standard Try Catch block as follows, the Catch section should return a Response with the exception passed as the parameter.
try
{
// Core BO Logic here
}
catch (Exception ex)
{
return new Response(ex);
}
There are a number of properties required for this business object these should be placed at the top of the class in a section called Properties and prefixed with a p as shown below example.
#region Properties
/// <summary>
/// SYSPRO Sales Order Number
/// </summary>
public string pSalesOrder { get; set; } = "";
The properties listed above will be required - StocktakeItemPost [WCONTROL002] | Parameters
As ALL business objects under the StockTake.cs class (Functional Area) are contained within the same class, the above mentioned properties(s) will be shared and this we need to indicate to the 3rd party developer which are applicable to the business object being called
For this reason the following example lines need to be added as a decoration to the method.
<Description1> - This is a short description of the Object
<Parameter1> - This is the name of the parameter, e.g. pTrackId
<Mandatory/Options> - This indicates if the parameter is mandatory or optional
<Code> - This is the code of the business object e.g. WCONTROL002
<Mandatory> - This is a boolean if the parameter is mandatory (true) or optional (false)
<Default> - This the default value of the parameter
<Description2> - This is a short description for the parameter.
** Additional Validation and Logic
As per the table above there are a number of additional validations steps for the input fields as follows:
A bin can be counted as an “Empty” bin, meaning no Track IDs or stock were found in it, the options for this property are Y or N
Y - the bin will be marked as an empty bin, please use the same logic as the HTML5 page
Only Warehouse and Bin will need to be passed through with this option
N - the bin will counted as per normal
All standard fields and rules should be applied when set to N
If there is an existing count for the Bin/TrackID/StockCode/Lot combination and the user posts another count, the new count should replace the existing count
If a TrackID being counted has already been counted in a different bin please display the following warning and block the post:
The stock code should be checked if it is a kit type - if it is please display the following warning and block the post:
If an existing lot has been supplied and a Expiry Date is either found in Syspro or WMS, the date supplied should be ignored and the existing expiry date should be used.
There is existing logic to check for expiry dates
Please provide as part of the response, the following:
There are 3 valid options for UOM - STOCKING, ALTERNATE or OTHER, if none are supplied the default value under the warehouse setting DEFAULT_CAPTURE_UOM can be used.
Existing System Settings to be validated:
Please apply the same logic and messages that would appear on the HTML 5 screen for the 2 settings below:
DEFAULT_CAPTURE_UOM - This setting indicates the default capture UOM, if no UOM is provided the default can be used, if no UOM is provided and there is no default set please display the following warning:
VALIDATE_PICKFACE_LINK - This will determine if the system validates that if the destination location is a Pickface bin that the stock has been set up to exist in the specific bin.
Sample XML:
<pWarehouse>FG</pWarehouse>
<pBin>01-A-02-B</pBin>
<pEmptyBin>N</pEmpyBin>
<pTrackIDs>
<pTrackID>
<pTrackIDItem>
<pTrackID>100987</pTrackID >
<pStockCode>LOT100</pStockCode>
<pLot>00125</pLot>
<pExpiryDate>2025-06-25</ pExpiryDate>
<pQuantity>100</pQuantity>
<pUOM>STOCKING</pUOM>
</pTrackIDItem>
</pTrackID>
<pTrackID>
<pTrackIDItem>
<pTrackID>100986</pTrackID >
<pStockCode>A100</pStockCode>
<pLot></pLot>
<pExpiryDate></ pExpiryDate>
<pQuantity>55</pQuantity>
<pUOM>OTHER</pUOM>
</pTrackIDItem>
</pTrackID>
</pTrackIDs>
Testing the BO
The Business Object Harness application should be used to assist in troubleshooting and testing any of the DATASCOPE WMS Business Objects.
Ensure you followed the installation process to install and configure the Business Object Harness application.
To test the Business Object
o Open the Business Object Harness
o Enter the Company ID you would like to login to, followed by a valid Operator, along with its password and company password (if any). Clicking the Login button will then attempt to log in to the system using the WebAPI.
o The first step in posting an object is to select and add it to the main content window.
o Now you are ready to start testing the Business Object.