Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, June 16, 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: Where is the Account List Page Datagrid?
Kent Matthew
Posts: 33
 
Where is the Account List Page Datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jul 06 1:39 PM
fiogf49gjkf0d
I want to make some changes to the Account List page datagrid, but can't seem to find it...! I understand that datagrids are created by queries, but I can't find any query references in the searchaccdgrp template. Could someone explain a systematic way to determine which query is invoked from a template?

Specifically, I want to get at this query to see if I can fix the fact that sorting by the account column heading actually sorts by Account ID instead of the Account Description which displays. Also, I want to see how the record totals are derived (i.e. "Records 21 - 40 of 255") so that I can display similar totals in the Account Detail page (which the network client already does).

There are all kinds of opportunities here for more knowledgeable folks to enlighten me...!
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Where is the Account List Page Datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jul 06 2:29 PM
fiogf49gjkf0d
Kent,

Are you referring to the Screen titled Accounts that has controls for "Lookup Account(s) by:" and "starting with:"?

If so the grid is driven by the acc_acc Query. The Query is called from the accacc.htm Template.



[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Where is the Account List Page Datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Jul 06 2:57 PM
fiogf49gjkf0d
Kent,

You didn't say which version...what I'm going to discuss applies to 6.2.3 and 6.2.4 - prior to 6.2.3, the web client used an ActiveX control whereas 6.2.3+ uses .NET. That being said, most of the methods in the .NET stuff are available via the ActiveX control in versions prior to 6.2.3, and although the behind the scenes implementation is different, most of the references still work. The SLX developers basically wrapped all the .NET stuff with javascript, so calls from previous versions aren't as likely to break, although there are some differences.

The searchaccdgrp template doesn't use a query object, as it only displays groups that are the dynamic groups build on SQL conditions.

Near the bottom of searchaccdgrp, you'll see this:

document.write(top.GM.ShowGroup(gid, vstart, vpage, '<#AF name=ctemplate>', '<#AF name=atemplate>', '<#AF name=otemplate>', '<#AF name=ttemplate>', '<#AF name=return>', '<#AF name=step>'));
}

That line is what displays the group. It invokes the group manager object, which uses xml over http to get the data and display it.

If you open "groupmanager.js" and look at the function function groupmanager_ShowGroup(strGroupID, ...), youll see how it constructs the URL that gets passed to the .NET object. Throw a "debugger;" statement in the groupmanager.js in that function and step into the code (or do an alert), you can see what's being passed. Having said that, the sort should be determined by how the group was defined. There could be a bug, though.

As for displaying record position on the account detail, that should be easy. All you should need on the account detail is some inline javascript code like this:

<script language="javascript">
document.write("Record " + top.GM.PositionInGroup(strGroupID, strMemberID) + " of " + top.GM.Count(strGroupID);
</script>

I didn't actually test that, but that's the gist and should work. If I got something wrong or you hit issues, post again.

There's a lot of great stuff in the group manager beyond these items - it's worth the time to poke around and see what there is!

HTH,

Jeff


[Reply][Quote]
Kent Matthew
Posts: 33
 
Re: Where is the Account List Page Datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Jul 06 12:38 PM
fiogf49gjkf0d
Thanks, Jeff. This is excellent information, and it cleared up a lot of my confusion. My remaining sticking points are:

1. Column sorting is effected by passing the appropriate sort column number via the URL to the getFromServer() function. I've debugged as you suggested, and when sorting by the 'Account' column on the Accounts List page, a sort column value of 1 is passed to the getFromServer() function. Logically, this should refer to the Account Description field, but I can't see what column 1 maps to in this function. By examining the database, I've determined that column 1 must refer to Account ID, not Account Description. Thus, just as you said, it looks like there's a bug in the code. My question is: Do I have access to fix it, or does Sage have to fix it because it's not developer-accessible?

2. How do I derive the values for the strGroupID and strMemberID parameters? I've been poking around the code all morning, but can't seem to find the references to these (mostly because I don't see where the PositionInGroup function is being invoked). I can display the values once I get to the PositionInGroup function, and when I hard code the values in the JavaScript block on the Account Detail page, your code for displaying record position works perfectly.

Thanks again for the good info,
- Kent

[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Where is the Account List Page Datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Jul 06 2:46 PM
fiogf49gjkf0d
Quote:
Thus, just as you said, it looks like there's a bug in the code. My question is: Do I have access to fix it, or does Sage have to fix it because it's not developer-accessible?

I'm not sure. I'm going to guess that you might be able to, but I haven't tried it. Looking SP3 and SP4 databases, I see the same issue as you do. The sorting gets all hosed up if you sort, page forward (on all accounts group), sort, page back, etc. It gets completely confused. The datagrid should be calling the "resort" function in the "mainlib.js" (I thought it it had the datagrid.htc behavior attached to it), but it doesn't seem to trip the debugger when I put the keyword in the resort function when I sort a group (as opposed to a lookup). You could do an alert or debug the respText in the getFromServer function to see if there is JavaScript in the HTML that has the group result to see if it calls something special to resort. I didn't see anything, but I didn't look too carefully, either.

Quote:
How do I derive the values for the strGroupID and strMemberID parameters?

You should be able to get the group ID by doing something like:

groupid = top.GM.GetCurrentGroupID(top.GM.CurrentMode)

You can hard code the 'top.GM.CurrentMode' to zero for contact, 1 for account, 2 for opportunity, and I think 8 for tickets. Just be careful where you hard code things. top.GM.CurrentMode is safer.

The member ID is your current account, contact or opportunity ID. To get the account ID on the account detail, you can do something like
<#AF name=id>

Actually, that should work on the contact detail is well. You can usually safely use
<#AF name=accid> or <#AF name=conid> or <#AF name=oppid> as well. They get you the account, contact or opportunity ID respectively.

Jeff
[Reply][Quote]
Kent Matthew
Posts: 33
 
Re: Where is the Account List Page Datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Jul 06 2:36 PM
fiogf49gjkf0d
Jeff,

Brilliant! I can now display the record position relative to the total number of records in the Account Detail page with the following little code snippet:

<script language="javascript">
var RecordCount = top.GM.PositionInGroup(top.GM.GetCurrentGroupID(top.GM.CurrentMode), '<#AF name=id>');
RecordCount++;
document.write("Record " + RecordCount + " of " + top.GM.Count(top.GM.GetCurrentGroupID(top.GM.CurrentMode)));
</script>

As far as the sorting issue, the alert that I put into display the respText variable in the getFromServer function did actually refer to the resort() JavaScript function in mainlib.js as you suspected, but I found out that this function actually sorts the tabs in the Account Detail page, not the Account List itself. I'm leaning more and more towards the theory that developers can't get at this code.

Now that you've solved my record position display quandary, I'm noticing another issue with attempting to navigate between two duplicate accounts on the Account Detail page. Since it's not really related to the initial issue, though, I'll make a separate post.

Thanks again for the excellent suggestions!
- Kent
[Reply][Quote]
Kent Matthew
Posts: 33
 
Re: Where is the Account List Page Datagrid?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Aug 06 4:01 PM
fiogf49gjkf0d
Here's a small twist to my question above: If the user uses the standard or advanced lookup to find accounts, for example, what would you suggest using in place of top.GM.GetCurrentGroupID, since it's empty in such a case? Is there any way to get the current position and total count for "on-the-fly" collections of accounts?

Thanks again,
- Kent
[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): 6/16/2024 1:48:37 PM