Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Values For IC LastReturnCode

Status
Not open for further replies.

ofern01

Programmer
May 28, 2007
12
PA
Does Any One Knows the Values and Description of this codes Returns when Using .NET Objects
Thanks...
 
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.

Thanks...
 
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.
 
I didn't Said you were. Sorry if That was misunderstood. I just Wanted to Make you. Writing and talking are 2 different things.

That is good to know. I though that it was requiered all the time. Thanks, I will remove it then.

Thanks you for you assistance....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top