I'm Generating Adjustments to Inventory Using ACCPAC .NET Objects. I have Set The Allow Inventory Negative Level to True in Inventory Module Options.
Still When I Process the Adjustment on Items That Goes Negative, It Generates an Exeption When I process The Line. I added a Try Catch to Bypass The Error and Continue, But I like to Catch the Error Code and Determine the Origen to see if I can Proceed or not.
This is the code:
Try
ICADE1detail1.Process()
Catch ex As Exception
Dim lcCode As String = ICADE1detail1.LastReturnCode
' Here Is where I need to Know
Try
oAcctSession.Errors.Clear()
Catch ex1 As Exception
End Try
End Try
BTW, Session.Errors is Clean. It does not Have Anything in it.