Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, November 30, 2024 
 
slxdeveloper.com Community Forums  
   
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!
 Architect Forums - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Toolbar And Form Connection
Mark Mugleston
Posts: 1
 
Toolbar And Form ConnectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 08 10:57 AM
I'm trying to connect a toolbar icon with a custom-made form and cannot connect the two through the "Argument" box on the standard toolbar plugin. How do I do this? (I'm a new slx developer.)

Here's some more info to help: I have both toolbar icon and form, frmAddRadioEntry, created. I can see my toolbar icon in the slx client. When I press it, it says "Unknown Function Number: -1" Meaning, it's not connected to something. I want my form, frmAddRadioEntry, to pop up when this icon is pressed.

I can see how other toolbar items are argumented: Function Insert:ContactAccount, Function Insert:Opportunity, etc. How do I bridge my gap?

[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Toolbar And Form ConnectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 May 08 3:59 AM
Hi Mark,

Firstly, the form needs to be a Managed Form - you cannot directly open a data linked form from a toolbar button.

Next, the name that you have given the form - frmAddRadioEntry - is not relevant, what you need is the name and family that is has been saved as - e.g. "System:Add Radio Entry". Then you could call it from a button by setting the type to be "Form" and the argument to be "System:Add Radio Entry".

If you want it as a function, and if you want to launch a data linked form then this is the way to go, you will have to add a new Global Script to create your function and write the necessary code to handle launching the add form.

If you are very new, I can recommend a good book



Cheers,


Stephen
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Toolbar And Form ConnectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 May 08 8:26 AM
Did anyone mention creating a secfunction to tie to the global script?
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Toolbar And Form ConnectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 May 08 10:35 AM
Hi Mike,

Not strictly necessary anymore.


Stephen
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Toolbar And Form ConnectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 May 08 10:56 AM
Stephen,

I'd love to hear more about that. I must have missed something and I could use a shortcut or two in my bag of tricks.
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Toolbar And Form ConnectionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 May 08 3:39 PM
Hi Mike,

Below is an extract from the DevLogix WorkBook (available from www.cafepress.com/devlogixshop). This shows how to new System Function. Once it is there, it can be called as a function called "InsertWidget". This is all you need to do.


Stephen


Create a new System Function
SalesLogix allows us to define our own system functions that can be invoked by name.

Step-by-Step
1. From the File menu, select “New Plugin” – “Global Script”.



2. A number of default functions are displayed – delete these.

3. Insert the following code:

Option Explicit
Function OnBeforeFunctionExecute_InsertWidget _
(functionNumber, functionName)

End Function

4. Copy the whole of the “Invoke Add Widget” script between the “Sub Main” and “End Sub”. Paste this into the new Function:

Option Explicit
Function OnAfterFunctionExecute_InsertWidget _
(functionNumber, functionName)
Dim iRes

iRes = Application.BasicFunctions.ShowViewForRecord _
("WIDGET", "System:Widget Detail", "")

if iRes = mrOK then
Dim ID
ID = Application.GlobalInfo("NEWWIDGETID")

' Load the passed ID in the Main View
Dim MV
Set MV = Application.MainViews.Add _
("System:Widget Details", 1, True)

MV.ShowIDsAsLookupResult ID,ID
End if

End Function

5. Save the Global Script as “Global Widgets” in the System family.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/30/2024 1:25:45 AM