The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Suppressing pop-up for LookupEdit control
Posted: 03 Apr 06 3:09 PM
|
fiogf49gjkf0d I have a LookupEdit control on the Account Detail screen that contains a valid account.
When the user double-clicks on the display portion of the control the account that was displayed in the control becomes the new detail view. E.g., it works normally. However, I would like to suppress the Lookup pop-up that is automatically displayed when this happens.
I still want the Lookup pop-up to appear when the magnifying glass icon is clicked, but not when the control is double-clicked.
Is there any way to accomplish this in SalesLogix?
I'm using Version 6.2.1
On the control OnDblClick event, I call the following sub:
Sub OnDoubleClick(Sender)
If Sender.LookupID <> "" Then Application.BASICFunctions.SetCurrentAccountID Sender.LookupID End If
End Sub |
|
|
| |
|
Re: Suppressing pop-up for LookupEdit control
Posted: 03 Apr 06 5:25 PM
|
fiogf49gjkf0d There is no way to surpress the lookup on double click. We have done it before because users were double clicking to highlight a word to copy it and it pulls up the edit. So we did this through code, it is crude, but works:
Sub LookupEdit1DblClick(Sender) Dim oShell ' your code here Set oShell = CreateObject ("WScript.Shell") oShell.SendKeys "%{f4}", false Set oShell = Nothing End Sub |
|
|
|
Re: Suppressing pop-up for LookupEdit control
Posted: 03 Apr 06 5:33 PM
|
fiogf49gjkf0d You can also then jump to another view, much like the old link edit used to do.
Sub LookupEdit1DblClick(Sender) Dim oShell Application.BasicFunctions.SetCurrentAccountID = Sender.LookupID Set oShell = CreateObject ("WScript.Shell") oShell.SendKeys "%{f4}", false Set oShell = Nothing End Sub |
|
|
| |
| |
|
Re: Suppressing pop-up for LookupEdit control
Posted: 04 Apr 06 3:55 PM
|
fiogf49gjkf0d I can't honestly say why I did this thinking back, but I made a custom manage form with a textbox, a datagrid, and a button marked X to clear the textbox. I build the datagrid dynamically by passing SQL data through global scripts to the form. This grid always returns just one field (or a calculation of more) that when clicked will fill in the textbox with the string field. When OK is clicked, the form then passes this string field back to the originating form by using another global variable. It mimics a lookup edit popup form rather nicely and because I can change the SQL, this one form is serving a total of 3 customizations all with different data results.
In defense of my sanity, SalesLogix made about 10 varying lookup forms to do the same basic thing and you would think they would have merged them into one since there is honestly no difference in functionality between them. It's a bit overkill when lookup controls work (I do use them sparingly) but if you need a little more control over the data this is your best bet. You could probably even hook into the SalesLogix forms if one of them will suit your needs. |
|
|
|