Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
New Member
Posts: 1
Registered: ‎03-10-2011

Change Lookup

I’m dealing with the following issue: For one of our customizations we have custom form with a lookup control based on a custom table.

However in some situations this lookup should be change dynamically in the code to the ACCOUNT table.

 

I wanted to change the properties LookupMaintable, LookupId etc. of the lookup in the code, however I can find anywhere which syntax I should use for this. What should I do in the code to change for example the LookupMainTable of the LookupControl?

 

Version of SLX 6.2.5

 

 

Thanks for all help!

Highlighted
Gold Super Contributor
Posts: 3,087
Registered: ‎03-19-2009

Re: Change Lookup

Since this is 6.2.6, you did not say which set of controls you are using. When BP's (and clients) were customizing 6.2.x, a lot of it was done in "legacy" - Cypres enable and the control set that is part of it.

 

"ActiveX" and the associated NEW control set were added to SalesLogix in version 6.0 and the controls are almost the same.. but not quite. 

 

I'm going to assume you mean newer set .. and no, you cannot change the "LinkMainTable" property via code. In VBScripting terms, it is an "early binding" property and is accessable at design time only - not run time.

 

SO.. knowing that, how do you solve your problem? Here's one way - two lookup controls:

   a - One set for one table, the other to the other table

   b - both physically the same size and w/teh same left/top settigs

   c - both w/Visible = False

   d - switch visibility using an "form on-change" (or some other suitable event) where "X" is your test

   ex:

     Sub AXFormChange(Sender)

        If "X" Then

           lueControl1.Visible = True

           lueControl2.Visible = False

         Else

           lueControl1.Visible = Fallse

           lueControl2.Visible = True

         End If

--
RJ Ledger - rjledger@rjlSystems.net +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html