Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 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 - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Problem launching a form from a menu
Lou
Posts: 81
 
Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 8:50 AM
fiogf49gjkf0d
v6.2

I need to customize the "Manage" menu (from the SalesLogix "Standard Menus") to include a new item which launches a new custom form (a Data Form with a new custom table for it's BaseTable property). I have been able to insert the new menu item just fine; however, the following error message appears when I select it:

"Cannot find or access the subject required by the System:MyForm plugin using the option you selected. Contact your system administrator. 0x1 @0: Form System:MyForm"

This message appears even if I try to use pre-existing forms Is it possible to lauch a form from a menu? What is the "subject required" by the form?

[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 9:49 AM
fiogf49gjkf0d
I don't have a specfic answer for you but i've run into this error when running a form that is bound to a data table. For instance I have a button (works the same with menu items) that runs a calculator for the specific account. It runs fine at the account level (it's bound to an account table), but it throws this error at the contact level.

I was thinking about adding some script that would look at the level and move the user to the correct level if needed. Not sure if this is possible or if it'll work yet. I'm sure some of the other more experienced developers can chime in.
[Reply][Quote]
Lou
Posts: 81
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 9:51 AM
fiogf49gjkf0d
I figured out the problem...

I was trying to use a Data Form when I should be using a Manage Form! Funny how these things are easily overlooked!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 06 9:30 AM
fiogf49gjkf0d
If you did need to use a data form (for binding context) then you could launch that using ShowViewForRecord without getting the error you mentioned (it was complinaing about not having it's "subject" or context for binding. Using ShowViewForRecord allows you to give it context by passing an ID & table for an edit, or a blank ID for an add)

-Ryan
[Reply][Quote]
Ina Nortje
Posts: 57
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Aug 06 8:38 AM
fiogf49gjkf0d
I have this same problem, but on a data form with a grid (thus, it should dislpay all the records from the table)
How do I add context to a list view?

Also, I tried using a manage form instead, but then it just doesn't show the data in the table when the form launches.

Ina
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Aug 06 10:22 AM
fiogf49gjkf0d
the syntax is

ShowViewForRecord(TableName As String, FormName As String, RecordID As String) As ModalResult


Here is a link to an article with an example
http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=48&
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Aug 06 10:38 AM
fiogf49gjkf0d
Quote:
Originally posted by Ina Nortje

I have this same problem, but on a data form with a grid (thus, it should dislpay all the records from the table)
How do I add context to a list view?


Did you set the BindID of the Grid?

How is the form that contains the grid launched from the user interface --from a tab, or menu, or ToolBar Icon?



[Reply][Quote]
Ina Nortje
Posts: 57
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Aug 06 11:38 AM
fiogf49gjkf0d
Hi there!

Thanks for the reply

The BindID on the data form is set to the unique identifier of the new table, and the form is launced from the menu.
It seems like I have to set the context through the code somehow, but I cannot do it using
ShowViewForRecord(TableName As String, FormName As String, RecordID As String) As ModalResult
because this is not a detail form. I need the syntax to use to set the context of a grid.
[Reply][Quote]
Ina Nortje
Posts: 57
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Aug 06 12:06 PM
fiogf49gjkf0d
OK, I am one step further

When I use a manage form, I do not get the error. However, the grid does not refresh automatically when the form loads. I added the following code:


Sub grdDriversClick(Sender)

grdDrivers.Refresh

End Sub

However, I need the grid to refresh automatically on load. Is there any documentation on which events fire under which circumstances? I need to put this code on the first event that fires when this grid is loaded.

Thanks

Ina
[Reply][Quote]
Ina Nortje
Posts: 57
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Aug 06 12:06 PM
fiogf49gjkf0d
Duplicate posting
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Aug 06 9:41 PM
fiogf49gjkf0d
Quote:
Originally posted by Ina Nortje

When I use a manage form, I do not get the error. However, the grid does not refresh automatically when the form loads. I added the following code:


Sub grdDriversClick(Sender)

grdDrivers.Refresh

End Sub

However, I need the grid to refresh automatically on load. Is there any documentation on which events fire under which circumstances? I need to put this code on the first event that fires when this grid is loaded.

Put the grdDrivers.Refresh call in the WhenOpen event of your managed form.
[Reply][Quote]
Brian Kempe
Posts: 53
 
Re: Problem launching a form from a menuYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Sep 06 11:58 PM
fiogf49gjkf0d
I have begun putting my grid.refresh statements in both OnOpen and OnCreate events, because my forms get opened in different ways sometimes and one or the other wouldn't work.
[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/26/2024 3:36:11 PM