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!
|
|
"Unknown function number -1"
Posted: 12 Aug 09 2:55 PM
|
I am trying to access a newly created lookup using a custom table and joining it with the account table using the button control. In the Architect, I have verified the properties, the SQL in the lookup and FunctionLookupClick in the properties\events is set up and the cmd setup in the script. If I create it as a lookup (using the magnifying glass), it works. I have other button lookups on the account detail form that work fine. I have searche dthe help to no avail. What piece am I missing ? I am going in circles. TIA |
|
|
|
Re: "Unknown function number -1"
Posted: 13 Aug 09 4:14 AM
|
Add it to the general lookup function (if this is acc/con)
Case "cmdMyLookup" strLookup = "Account:MyLookupName" blnUseFunction = False ' This is important !
The above will then be part of the general lookup - but you need entity:lookupname
The full function would be:
Case "cmdMyLookup" strLookup = "Account:MyLookupName" blnUseFunction = False ' This is important !
If strLookup <> "" Then If blnUseFunction Then Application.BasicFunctions.DoInvoke "Function", "Lookup:" & strLookup 'DNL Else Application.BasicFunctions.DoInvoke "Lookup", strLookup 'DNL End If ErrorCheck Application.Translator.Localize("Error accessing SalesLogix VBScript functions:") End If
|
|
|
|
Re: "Unknown function number -1"
Posted: 13 Aug 09 12:38 PM
|
Thanks Mike ! The blnUseFunction = False fixed it. My last challenge is trying to prevent a lookup from updating a customized table. I can find ways to lock down the box on the form by using the properties area but I cannot figure out how to stop the lookup from updating the table. l get a post error stating "I cannot insert duplicate key in object dbo.account." I want to use it as a referennce. If I click the cancel box on the lookup, it works fine when I move to the next record (or try to save it) I get the error. TIA |
|
|
| |
|
Re: "Unknown function number -1"
Posted: 17 Aug 09 8:33 AM
|
Thanks Mike ! Oh boy ! I was able to unbind to the data table but now they want to be able to double click the entry on the lookup table and go to that record. Since it is not bound to the data table nothing happens. Setting boolean back to true does not work and I have tried other methods without success. Any ideas on how to get bound back to the database from the lookup ? |
|
|
|