SO creation dll  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Re: SO creation dll

Postby Riyaz » Tue Nov 12, 2019 10:16 am

Yes but I get this error "Collection index must be in the range 1 to the size of the collection" at the below line

.SalesOrderHistorys(.CurrentHistoryNo).DelAddress1 = "add1"
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: SO creation dll

Postby Scott.Pearce » Tue Nov 12, 2019 10:18 am

Message box out .CurrentHistoryNo
Message box out .SalesOrderHistorys.Count

Let's see what values they are.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: SO creation dll

Postby Mike.Sheen » Tue Nov 12, 2019 10:19 am

Riyaz wrote:Yes but I get this error "Collection index must be in the range 1 to the size of the collection" at the below line

.SalesOrderHistorys(.CurrentHistoryNo).DelAddress1 = "add1"


You need to provide some code we can run to get that error.

At a guess I'd say you didn't invoke the CreateNew() method after creating the sales order object from the factory - but all I can do is guess without you giving me more.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: SO creation dll

Postby Riyaz » Tue Nov 12, 2019 10:45 am

Thanks Mike

Yes that was spot on, I had provided the code chunk in the post, it was missing the createnew
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: SO creation dll  Topic is solved

Postby Mike.Sheen » Tue Nov 12, 2019 11:04 am

Mike.Sheen wrote:And then, as from what I can tell, you are creating a new sales order, so you want to invoke the CreateNew() method of the SalesOrder.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Previous

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 6 guests

cron