Page 1 of 1

CreateBusinessLogic arguments

PostPosted: Wed Jan 07, 2015 8:41 am
by DannyC
Hi,

I have a plugin executing via a ribbon button of sales orders.
I need to read a value from the debtor custom fields so I have the following lines to read the debtor information.
Code: Select all
      Dim Debtor As JiwaDebtors.Debtor = JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaDebtors.Debtor)
      Debtor.Read(SalesOrderForm.SalesOrder.Debtor.DebtorID)


When I compile, I am getting an error on the first line about CreateBusinessLogic accepting different arguments. I've already searched the forums for an answer and there is information about passing in a (null) parameter but I have tried all kinds of variations of that line and still no luck. Can you give me the correct syntax?

Cheers

Danny

Re: Get debtor custom field value from sales order  Topic is solved

PostPosted: Wed Jan 07, 2015 9:02 am
by Mike.Sheen
DannyC wrote:Can you give me the correct syntax?


Code: Select all
Dim Debtor As JiwaDebtors.Debtor = JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaDebtors.Debtor)(Nothing)


You actually asked the exact same question here. :P

Re: Get debtor custom field value from sales order

PostPosted: Wed Jan 07, 2015 9:16 am
by DannyC
Aging affects memory - badly!
Thanks. I actually used the forum search to find CreateBusinessLogic and it didn't display that post but anyway, putting in the Nothing at the end makes it compile successfully.
Awesome.

Separate issue, can you check my forum question in the Jiwa 6 area http://forums.jiwa.com.au/viewtopic.php?f=14&t=269

Thanks for the fast response

Re: CreateBusinessLogic arguments

PostPosted: Thu Jan 08, 2015 11:32 am
by Scott.Pearce
FYI - I have updated the topic heading of this thread to be more relevant to the question for future searches.

Re: Get debtor custom field value from sales order

PostPosted: Fri Jan 09, 2015 4:59 pm
by Mike.Sheen
DannyC wrote:I actually used the forum search to find CreateBusinessLogic and it didn't display that post


Use the Advanced search function!