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.
You only need to do .Process if you are using optional fields, if you do not have optional fields then leave it out.
Record a macro in Accpac and then take a look at the error handler in the recorded macro, use the same error handler in your code and you should get an error message.
I have Already Done So. This is not Optional Fields. This is Inventory Adjustment Detail View.
Like I mention, If I Run it in ACCPAC, I get a Question to Proceed with Inventory Going Negative, I Click ok and the process Continue. This is not An Error.
What I need is to know how To Desable that Question from .NET or How to Get a Error o Msg Code that is For This Reason only.
Yeah I know it is IC adjustments, I'm not stupid.
The question is: are you using optional fields in Accpac and IC?
If not, then remove the .Process lines because they are not required. They are only used if you have optional fields.
There is no message reported for negative inventory by the IC adjustment view.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.