Instantiating debtors in 7.1  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Instantiating debtors in 7.1

Postby DannyC » Mon Nov 13, 2017 11:47 am

Hi,

I have the following code which needs to create a debtor from the factory so that delivery address can be used in the plugin
Code: Select all
Dim Debtor As JiwaApplication.Entities.Debtor.Debtor = salesOrder.Manager.EntityFactory.CreateEntity(Of JiwaApplication.Entities.Debtor.Debtor)()
Debtor.ReadRecord(salesOrder.CustomFieldValues.ItemFromSettingName("ADifferentDebtor").Contents)
For Each DelAddr As JiwaDebtors.DeliveryAddress In Debtor.DeliveryAddresses
and so on

The problem is that the DeliveryAddresses is not a member of JiwApplication.Entities.Debtor.Debtor

What is the correct syntax for the Dim debtor line?

I've tried
Code: Select all
Dim Debtor As JiwaDebtors.Debtor = salesOrder.Manager.EntityFactory.CreateEntity(Of JiwaDebtors.Debtor)()

but that doesn't work either
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Instantiating debtors in 7.1  Topic is solved

Postby Scott.Pearce » Mon Nov 13, 2017 12:03 pm

Code: Select all
Dim Debtor As JiwaDebtors.Debtor = JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaDebtors.Debtor)(nothing)
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: Instantiating debtors in 7.1

Postby DannyC » Mon Nov 13, 2017 1:39 pm

Thanks for the quick answer.
Been struggling with that for a few hours!
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 14 guests