03-10-2011 04:56 AM
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!
03-10-2011 05:31 AM
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
If "X" Then
lueControl1.Visible = True
lueControl2.Visible = False
lueControl1.Visible = Fallse
lueControl2.Visible = True