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: Call Form from Data Grid
Sarah Peterson
Posts: 37
 
Call Form from Data GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 May 06 10:21 AM
fiogf49gjkf0d
I have a custom datagrid tab that displays the software that our customers have purchased. I have created this tab in such a way that will allow the administration department to select one, multiple, or all rows in this grid to change the status of the software records from Active to Inactive, Pending to Active, or change all records to Inactive. This part works great! However, I need to find a way that when the user selects one of these right-click options another form will pop-up allowing them to enter an Invoice Dt or and Inactive Dt (depending on the option selected) that will update the database at the same time the status gets updated. I have created a new form with these two date fields contained on it. I am having problems getting this edit form to pop-up. I also need a way to pass the date entered on the second form back to the script in the data form to complete the update sql statement that I have written there that updates the status,etc. Any suggestions? I have tried using the code that is contained in the Opportunity Detail screen for the Close Opportunity pop-up screen but that doesn't appear to be working either. Ideally, if there is currently an Inactive Dt or Invoice Dt already in this record, I would like that to display in the pop-up form as an alert to the user that there is currently a date value for this record so they would be overwriting it if changed.

Hope this makes sense!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Call Form from Data GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 06 12:30 PM
fiogf49gjkf0d
There's a few different ways to launch the form from the grid. The best way is to load it in a MainView and then you can pass some properties to it for the values you need. But a simpler route might be to just load it normally. I am guessing that this is a data form (bound to your table). If that is the case then you need to use ShowViewForRecord to display it and pass the ID value for the row in question to give it context (See http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=48 for some info on ShowViewForRecord).

As far as passing values back and forth, you can use Globals for that. Take a look at Application.GlobalInfo. You can set values there and then grab them from the invoked form. When done you can add some values there you can grab from the calling form (where the grid is) if needed.

Does that help?
[Reply][Quote]
Sarah Peterson
Posts: 37
 
Re: Call Form from Data GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 06 3:40 PM

abortion pill online usa

abortion pill usa legal go
fiogf49gjkf0d
I was incorrect in the last part of my original post. After thinking this through it does not make sense for me to say "Ideally, if there is currently an Inactive Dt or Invoice Dt already in this record, I would like that to display in the pop-up form as an alert to the user that there is currently a date value for this record so they would be overwriting it if changed." The reason being is because the right-click functionality that I have added is to allow users to select multiple records and have all of those records updated with the date they have entered into this pop-up screen. That being said, I do understand the information that was given regarding the ShowViewForRecord and I think I know what I need to do. Basically, I'm going to pass it a keyfield value that really isn't going to do anything but "Trick" the form into thinking it's for a specific record. Then if OK is selected I will just set a global variable to pass that data back to the grid script to update the database. I don't know....that sounds too "easy" but I will give it a whirl and let you know if I break something!!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Call Form from Data GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 May 06 3:48 PM

precio lomper comprimidos

lomper 20 mg precio
fiogf49gjkf0d
Quote:
Originally posted by Sarah Peterson

Basically, I'm going to pass it a keyfield value that really isn't going to do anything but "Trick" the form into thinking it's for a specific record.


If that is what you want to do then I would just use a manage form, instead of a data form. A manage form is nothing but a stand alone form, no data binding, no record context. Then all you would need to do is just launch it (using Application.BasicFunctions.DoInvoke - or as a MainView).

You could pass the values around with globals, or even get a reference back to the calling form and do whatever you want from the manage form that is now displaying.

Something like this (from the dialog):

Dim frm

Set frm = Application.Forms("MyFamily:MyFormName")
If Not frm Is Nothing Then
' get what you need from the grid
frm.DataGrid1.Whatever

' you can even invoke a sub on the other form and pass it some values from this form too
frm.Script.MySub Edit1.Text
End If


See what I mean?

But basically, the point is to not use a data form, and instead use a Manage Form and script everthing behind it. Whether you pass things around with globals or get a reference to the other form to do things doesn't matter too much.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Call Form from Data GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 May 06 1:23 AM

buy naltrexone online india

low dose naltrexone buy zatextile.com

viagra discount coupons online

viagra discount coupons online sporturfintl.com
fiogf49gjkf0d
Typically a grid has a data view that is linked to one table. You could create 2 data forms that point to the same table. One data form opens up the datetimeedit controls, one data form opens up the rest of the grid information. If you're using inline editing of the grid then that second data form wouldn't be necessary. If you have multiple records selected you would ShowViewForRecord the first record selected, take the datetime values and update the remaining rows. Update multiple opportunities is the name of a stock SalesLogix form that probably does a lot of what you're doing here so if it's on your system you may get some more ideas from it.
[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:27:32 AM