Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, May 28, 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!
 Web Forums - SalesLogix Web Client (Pre-7.2)
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Client (Pre-7.2) | New ThreadView:  Search:  
 Author  Thread: Grid Refresh
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 06 8:56 AM
fiogf49gjkf0d
I have a custom query tab off of contacts. I have everything working correctly as far as adding, editing and deleting. When I edit a record and save it, the grid does not refresh. If I move off the grid and back on, it refreshes with the correct data. But then if I click the hyperlink to edit it the old data shows up.. Kinda like a caching problem or something.. Has anyone seen this or have any advise? Thanks

Steve K.
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 06 10:53 AM
fiogf49gjkf0d
Hi Steve , i have the same setup here and it refreshes without any problem.Is it anything to do with the system??

Do you have other places where the samething is happening or ONLY in this grid?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 06 11:13 AM
fiogf49gjkf0d
Hi Steve,

Whether or not the grid refreshes automatically depends on how the edit form in launched. If it is launched programatically then it is up to you to refresh the grid after. If it is just being launched by the built in "Edit Item" menu then it should refresh as well.

There's a couple of ways that you can cause the refresh to happen. First of all, if you are launching the edit form via code (for example, by using ShowViewForRecord) then you can check the return result of that call which will indicate whether the edit form's OK or Cancel button was clicked, and then refresh the grid. This method is described here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=48

Second, you can, from the close of the edit form, get a reference to the form with the grid on it and cause it to refresh. For example:

Dim frm

Set frm = Application.Forms["Family:FormPluginName"]
If Not frm Is Nothing Then
frm.DataGrid1.Refesh
End If
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 06 11:53 AM
fiogf49gjkf0d
Wow! that is cool....

Didnt know that we could use an Application object in a WEBCLIENT..
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Aug 06 12:09 PM
fiogf49gjkf0d
Hahahaha. Oops. I totally missed which forum this was in. Sorry, but no you can't do any of that in the web client.

Maybe you could add a META tag force no caching? I seem to remember having this problem once. I work so little with the web client that I can't remember what I did to solve it. I'll see if I still have the system up that I used when I had this issue and see what I did to get around it.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Aug 06 5:29 AM
fiogf49gjkf0d
Hi,

When you are returning to the page you should call either a loading of target=main_content, or a loading of the tab. It sounds like you are just doing a javascript window.close()??

Thanks,

nick
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Aug 06 8:22 AM
fiogf49gjkf0d
I am not opening a new window - I am displaying the edit view in the main window where the contact detail is. Then when the edit form is submitted the contact detail is redisplayed.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Aug 06 8:24 AM
fiogf49gjkf0d
Ah I get you. Can you try returning to the template as conmain so it loads the whole framset and not just the coninfo template?
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Grid RefreshYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Aug 06 10:16 AM
fiogf49gjkf0d
Steve,

Another option.

In your edit web action that updates, at the end, set a "RequestSetValue", say with a name of "fromeditaction" with a value of "T", like so:

RequestSetValue "fromeditaction", "T"

Then, in the statement in the conmain HTML, find the function that is references (in the base package, it's called "init", and I believe that function is actually in "coninfo.js". Modify the "init()" function to check the flag set via the RequestSetValue, like this:

function init() {
// existing code above, new code below

if ("<#AF name=fromeditaction"> == "T") {
parent.main_content.query.location.href = swcpath + "/view?name=contabs&conid=" + variableforconid +... + "....."
}
}

A couple of caveats: the parent.main_content... reference above, while I think is correct, may have the DOM messed up. You can use the script debugger (or Visual Studio) to examine the objects to get the right path to reload the tabs frameset. You'll also have to add some variables to the top of coninfo to get the contact id for use in setting the location.href, because you can't use the <#AF> (or any <#> tag on an included JavaScript file).

It sounds like a lot, but it's not. It can be a bit tricky to get right, though. The hardest part is getting the object references right.

Basically, on the load of your contact detail, you're looking for a flag. if that flag is true, then you reload your tabs frameset.

Maybe this'll help, and if I need to clarify, feel free to post again.

Jeff
[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): 5/28/2024 6:29:26 PM