AddInventoryItem returning FALSE even though adding line

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Re: AddInventoryItem returning FALSE even though adding line

Postby Scott.Pearce » Mon Apr 26, 2021 12:06 pm

AddInventoryItem does not return a boolean. It returns a JiwaSalesQuote.clsSalesQuoteLines.SalesQuoteLineReturnCodes

You are implicitly casting a "JiwaSalesQuote.clsSalesQuoteLines.SalesQuoteLineReturnCodes" type into a boolean type. Don't do this.

Your call should look like this:

Code: Select all
If AddInventoryItem(InvItem.InventoryID, e_SalesQuoteLineInventoryID, NewLineKey, Row + MyLoop) = e_SalesQuoteLineReturnCodeSuccess Then
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 748
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 225

Re: AddInventoryItem returning FALSE even though adding line

Postby Scott.Pearce » Mon Apr 26, 2021 5:05 pm

Is this in VBScript?
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 748
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 225


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron