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!
|
|
ShowViewforRecord
Posted: 14 Mar 10 1:45 AM
|
I don't want to open a new/another form......simply keep the window open and post another record in that form......
must be something simple.....
Set the current ID to another ID Value and refresh the form or something like that?
Thanks! |
|
|
|
Re: ShowViewforRecord
Posted: 14 Mar 10 5:43 AM
|
You just want to move from one record in a MV to another, based on ID? |
|
|
|
Re: ShowViewforRecord
Posted: 15 Mar 10 7:28 PM
|
It's a data form....I can .POST the data to save it.....I'm on the form and I need to simply bring in another ID's worth of data....the form is called from a bunch of different locations using Showviewforrecord.....so I can't relaunch the record from the calling form. If I launch another ID with showviewforrecord I get a second form......and If I close current view it doesn't run until the subsequent formSSSS close.....
Opportunity_Product table is what I'm on....
if there was a command to load CurrentID and then a .Refresh kind of thing.... |
|
|
|
Re: ShowViewforRecord
Posted: 16 Mar 10 12:24 PM
|
How about using a Main View to wrap around your Detail view? With the Main View you could then set the Current ID.
Also, it is possible to create a Main View object and instead called a Form Plugin, so I am not referring to actually creating a Main View, but at runtime:
Set MV = Application.MainViews.Add("Personal:My Detail View", 1, TRUE) MV.Show MV.CurrentID = MyRecordID
If you need to modify the record you are viewing, you may be able to get a reference to the Main View and update its CurrentID.
|
|
|
|
Re: ShowViewforRecord
Posted: 16 Mar 10 4:03 PM
|
Then I would have to edit all forms/script plugins where I launched this form to use the MainView wrapper instead, something I'm trying to avoid.
I can set a Global Info "Relaunch The Form". False Then a While Do kind of thing where I keep relaunching the Form in a mainview wrapper as long as the global info "Relaunch The Form" is True....
Then in the form I could set "Relaunch The Form". False or True depending on what the customer did.....but then I'd have to put it in a dozen locations.....
I know I can do this with a managed view....isn't there someway to do this with a databound form, some way to trigger the databinding refresh? |
|
|
|
Re: ShowViewforRecord
Posted: 16 Mar 10 4:04 PM
|
Then I would have to edit all forms/script plugins where I launched this form to use the MainView wrapper instead, something I'm trying to avoid.
I can set a Global Info "Relaunch The Form". False Then a While Do kind of thing where I keep relaunching the Form in a mainview wrapper as long as the global info "Relaunch The Form" is True....
Then in the form I could set "Relaunch The Form". False or True depending on what the customer did.....but then I'd have to put it in a dozen locations.....
I know I can do this with a managed view....isn't there someway to do this with a databound form, some way to trigger the databinding refresh? |
|
|
|
Re: ShowViewforRecord
Posted: 17 Mar 10 12:07 PM
|
It's a rewrite, but what i've done is rebuild the form with a datagrid and a panel, script the panel to the grid and when the form is launched take the incoming id, use it to scope the grid binding and issue a refresh against the panel based on the id. Note: the grid might or might not be visible (if not a list of IDs will do). I've used Up/Dn arrows or Next/Pre. and/or bound the OK to a batch save vs a record save. Its code all options are avaliable.
So if its a opportunity product ID the form would bind the grid to the opportunityid, find that oppProduct and display it in the panel. This allows you to use the grid events to do the data processing in the panel, if you want.
The OK on the form would then call your scripted update and close the form as a cancel (no binding). Once you complete the form just Save it over the old one and everyone is happy. |
|
|
|