Custom lookup for Brach  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Custom lookup for Brach

Postby DannyC » Mon Aug 24, 2020 10:51 am

I have a custom field on debtors which is a lookup to branch.This code worked fine in 7.0.175
Code: Select all
    Public Sub ButtonClicked(ByVal BusinessLogicHost As JiwaApplication.IJiwaBusinessLogic, ByVal GridObject As JiwaApplication.Controls.JiwaGrid, ByVal FormObject As JiwaApplication.IJiwaForm, ByVal Col As Integer, ByVal Row As Integer, ByVal HostObject As JiwaApplication.IJiwaCustomFieldValues, ByVal CustomField As JiwaApplication.CustomFields.CustomField, ByVal CustomFieldValue As JiwaApplication.CustomFields.CustomFieldValue) Implements JiwaApplication.IJiwaCustomFieldPlugin.ButtonClicked
      ' Search   
      If CustomField.PluginCustomField.Name = "SalesDivision" Then
         Dim branch As New JiwaApplication.Entities.Sales.Branch
         branch.Search(FormObject.Form, "")
         CustomFieldValue.Contents = branch.Description       
         CustomFieldValue.DisplayContents = branch.Description          
      End If
    End Sub

but it doesn't work in 7.2.1. No error, it just doesn't display the search window when the buttonclick is clicked.

What the trick to getting it to to display in 7.2.1? Yep - in VB!
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Custom lookup for Brach  Topic is solved

Postby Mike.Sheen » Mon Aug 24, 2020 10:54 am

Code: Select all
Dim branch As New JiwaApplication.Entities.Sales.Branch


This isn't using the factory to create the entity. Use the factory!
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Custom lookup for Brach

Postby DannyC » Mon Aug 24, 2020 11:15 am

Awesome!
All sorted.
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests