on 04-03-2014 3:09 AM
Hi experts, just want to ask what is the problem when posting AR Invoice with serial number. The error is "Internal error (-5002) occurred [الرسالة 131-183]"
Here's my code :
If Not oSerial Is Nothing Then
oSerial.DefaultView.RowFilter = "product_reference_code = '" & oDrView("product_reference_code") & "' " 'AND site_reference = '" & oDrView("site_reference") & "' "
For Each oDrSerial As DataRowView In oSerial.DefaultView
Try
.Lines.SerialNumbers.Quantity = 1
.Lines.SerialNumbers.InternalSerialNumber = oDrSerial("serial_no")
.Lines.SerialNumbers.Add()
Catch ex As Exception
End Try
Next
End If
Hi Bryan,
Have you try to debug it , which line is causing problem.
With serial numbers you don't have to set the qty.
other fields that need to be set are :
for (int count = 0 ; count < totalcount; count ++)
{
if (count > 0)
.Lines.SerialNumbers.Add();
.Lines.SerialNumbers.SystemSerialNumber = SysSerialNum;
.Lines.SerialNumbers.ManufacturingSerialNumber = ManufacturingNum;
.Lines.SerialNumbers.InternalSerialNumber = internalserialnumber;
Count++ ;
}
Hope it will help.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Byan,
When you start with serials, there is already one line present.
So if you only have one serial you don't use the .Add command
When addin the second line you start with the .Add command.
in short, just remove the line with .Lines.SerialNumbers.Add()
Regards
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.