EliserhsService
EliserhsService.asmx
This web service has a method to inquire serial number history.
ViewHistory
This method returns up to 50 serial history records for a serial number.
Usage:
ViewHistoryResult = A.ViewHistory(UserName, UserPassword, ITEM_NO, SerialNo, ForDocumentType)
Parameters UserName and UserPassword are not used at this moment.
Input Parameter
Parameter |
Length |
Type |
Upper |
Detail |
ITEM_NO |
15 |
String |
Y |
|
SerialNo |
15 |
String |
Y |
Required. |
ForDocumentType |
1 |
String |
Y |
Blank: Return all document types I: Invoice From COP S: Issue Out From IM R: Receive From IM P: Receive From PO N: Neg Receive From PO B: Receive From BOMP F: Receive From SFC C: Issue From SFC |
ViewHistoryResult Structure
Property |
Type |
Detail |
ReturnCode |
Integer |
Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. |
ReturnMsg |
String |
This is description of return code. For example, if return code is zero, you can expect “OK” in this field. |
NoOfRecords |
Integer |
This method returns maximum 50 records. |
SerialHistoryRecord() |
SerialHistoryRecord |
Contains up to 50 records. See “SerialHistoryRecord Structure” for detail. |
SerialHistoryRecord Structure
Property |
Type |
Detail |
ITEM_NO |
String |
|
SerialNo |
String |
|
ITEM_DESC1 |
String |
|
ITEM_DESC2 |
String |
|
DocumentType |
String |
|
DocumentNo |
String |
|
TrxDate |
Date |
|
CustomerVendorNo |
String |
|
Name |
String |
|
Address1 |
String |
|
Address2 |
String |
|
City |
String |
|
State |
String |
|
ZipCode |
String |
|
PhoneNo |
String |
|
Filler |
String |
|
Code Example
The following sample code will return serial history for item “049” and serial number “107207D”
Dim Service As New webServicesserhs.EliserhsService
Dim Result As New webServicesserhs.ViewHistoryResult
Dim ITEM_NO As String = “049”
Dim SerialNo As String = “107207D”
Result = Service.ViewHistory(“”, “”, ITEM_NO, SerialNo, “”)
If Result.ReturnCode = 0 Then
If Result.NoOfRecords > 0 Then
lblResult.Text = “First Serial History Record, Serial# is ” + _
Result.SerialHistoryRecord(0).SerialNo.trim
Else
lblResult.Text = “No Record Found”
End If
Else
lblResult.Text = “Error”
lblErrorCode.Text = Result.ReturnCode.ToString
End If
EliserhsService Return Code
0 = OK
1 = File Error
2 = Serial Number Not Provided (Required)
3 = Item Not On File
4 = Serial Record Not Found
CLS