Upgrading to JIWA 7.02 for Emaillog collection  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Upgrading to JIWA 7.02 for Emaillog collection

Postby Ernst » Tue Nov 27, 2018 10:41 am

Trying to upgrade this statement to 702. But it wont compile.

Is there a different CollectionItemFactory.CreateCollectionItem, I should be using.

Thx.


JIWA 7.0.175 Dim EmailLogCollection As New JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection
JIWA 7.02.00 Dim EmailLogCollection As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection = Plugin.Manager.CollectionItemFactory.CreateCollectionItem(Of JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection)
User avatar
Ernst
Kohai
Kohai
 
Posts: 221
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Upgrading to JIWA 7.02 for Emaillog collection

Postby Mike.Sheen » Tue Nov 27, 2018 10:56 am

Hi Ernst,

You want to use the CollectionFactory, not the CollectionItemFactory to create a collection.

PS: The error message you were given would have given you a big clue as to what the problem was.

Mike
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Upgrading to JIWA 7.02 for Emaillog collection

Postby Ernst » Tue Nov 27, 2018 11:11 am

This one does not compile in 702 either.

Dim EmailLogCollection As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection = Plugin.Manager.CollectionFactory.CreateCollection(Of JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection)


SO close... but so far.

PS the message. says. JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection does not inherit from JIWA.CollectionItem, even though there is no mention of item in the line??

Thx
User avatar
Ernst
Kohai
Kohai
 
Posts: 221
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Upgrading to JIWA 7.02 for Emaillog collection  Topic is solved

Postby Mike.Sheen » Tue Nov 27, 2018 11:18 am

Ernst wrote:This one does not compile in 702 either.

Dim EmailLogCollection As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection = Plugin.Manager.CollectionFactory.CreateCollection(Of JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection)


SO close... but so far.

PS the message. says. JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection does not inherit from JIWA.CollectionItem, even though there is no mention of item in the line??

Thx


In your case, I think you want this:
Code: Select all
Dim EmailLogCollection As  JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection = Plugin.Manager.CollectionFactory.CreateCollection(Of JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLogCollection, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.EmailLog)


Perhaps the function declaration for CreateCollection in the CollectionFactory will make it clearer? :P
Code: Select all
Public Overloads Function CreateCollection(Of CollectionType As {IJiwaCollection(Of CollectionItemType), New}, CollectionItemType As {IJiwaCollectionItem(Of CollectionItemType)})() As CollectionType
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Upgrading to JIWA 7.02 for Emaillog collection

Postby Ernst » Tue Nov 27, 2018 11:57 am

OK That one does compile.. Baie Dankie :D :)
User avatar
Ernst
Kohai
Kohai
 
Posts: 221
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 10 guests