Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 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: Speed issue with adding new contact/account
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Speed issue with adding new contact/accountYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 06 6:48 AM
fiogf49gjkf0d
Hi everyone,

I have a problem with adding a new contact/account.


When adding a new contact/account (on template conadd2) an xml island is generated to populate all the account/contact fields necessary (in order to default account field if you are adding a new contact for account etc.). This is fine as it only brings back the the data required (a small query). The problem is along with bringing back the small amount of xml, it runs sql against all accounts in the database, as you can see from the sqlgen key from the xml below:
I cannot see why it does it – but the problem is when you have 200,000 accounts the above sql takes 6 seconds to run in query analyzer alone!


Ive checked the clauses on the query and they rightly limit to just the current :accid, but it still queries against all…..

Any ideas?

Many thanks

Nick

Ps there should be xml in this, but it may be stripped, if so its the xml island at the bottom of the template conadd2 (the sql being run:
SELECT A1.ACCOUNTID, A1.MAINPHONE, A1.FAX, A2.POSTALCODE A2_POSTALCODE, A1.WEBADDRESS, A1.TYPE, A1.SUBTYPE, A1.STATUS, A2.STATE A2_STATE, A3.STARTDATE A3_STARTDATE, A1.SICCODE, A1.SECCODEID, A1.ACCOUNT, A1.ACCOUNTMANAGERID, A1.LEADSOURCEID, A4.DESCRIPTION A4_DESCRIPTION, A1.INDUSTRY, A3.UNDER_30 A3_UNDER_30, A3.SECTOR A3_SECTOR, A3.RECORDSTATUS A3_RECORDSTATUS, A3.NATURE A3_NATURE, A3.MAJORITY_DISABILITY A3_MAJORITY_DISABILITY, A3.GENDER A3_GENDER, A3.EXPORTSTATUS A3_EXPORTSTATUS, A3.ETHNICITY A3_ETHNICITY, A3.EMPLOYEDGLOBALLY A3_EMPLOYEDGLOBALLY, A3.CLASSIFICATION A3_CLASSIFICATION, A1.EMPLOYEES, A1.EMAIL, A2.COUNTRY A2_COUNTRY, A3.COMPANYREGNO A3_COMPANYREGNO, A2.CITY A2_CITY, A1.BUSINESSDESCRIPTION, A2.ADDRESS3 A2_ADDRESS3, A2.ADDRESS2 A2_ADDRESS2, A2.ADDRESS1 A2_ADDRESS1, A3.PRE_START A3_PRE_START FROM ACCOUNT A1 INNER JOIN ADDRESS A2 ON (A1.ADDRESSID=A2.ADDRESSID) LEFT JOIN ACCOUNT_EXTRA A3 ON (A1.ACCOUNTID=A3.ACCOUNTID) LEFT JOIN LEADSOURCE A4 ON (A1.LEADSOURCEID=A4.LEADSOURCEID)
....

[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Speed issue with adding new contact/accountYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 06 10:32 AM
fiogf49gjkf0d
Nick,

It definitely messed up the XML, but I'll take a shot at answering your question.

I don't know what version, but I'm assuming 6.2.3+. In 6.2.3, in "conadd2", there is a < body > statement like this:

< body onLoad="/*getvals();*/ init();" >


try adding this:


< body onLoad="/*getvals();*/ alert('accid: <#AF name=accid>'); init();" >


Looking at the "JavaScript: doNext("/scripts/slxweb.dll/view?name=conadd2&accid=&accname..." in the resulting page, accid has no value. The body
onload statement I suggested will alert the value of "accid". If that doesn't have a value, that's why your query is returning the whole database.

If that's the issue, you'll need to look at where the "continue" button is pressed on conadd1 and make sure that the hidden field on conadd1 named "accid" is populated. You might change the control on conadd1 to look like this for debugging:


<input type="hidden" name="accid" value="<#AF name=accid>">


so you can see the actual input control.

I'd be willing to bet that somehow your accid isn't getting populated, causing the query object xml/island to return all records.

Jeff
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Speed issue with adding new contact/accountYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 06 10:51 AM
fiogf49gjkf0d
Hi Jeff,

Thanks for the response. My xml island is bringing back the correct data (well only one record) but the accid is blank on conadd1 (unless i select an account to add a contact too), so it must be this. I guess it must always be blank (in eval) when you first go into conadd1 as i havent changed the way accid is available as a #af field. I shall add an arbitrary accid if it is blank!

Many thanks

Nick
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Speed issue with adding new contact/accountYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 06 11:07 AM
fiogf49gjkf0d
Nick,

I'm sorry - I don't think I read your first post close enough - I didn't realize your data island was coming back with the correct data.

You're right, though. You probably do need to add an aribitrary ID. If you don't pass a value in for *any* parameter, then the web DLL will drop the condition from the query, and in this case, resulting in it running against all records in the database. Adding 12 X's should work. Bad design/implementation on that, as far as it not adding the arbitrary ID. I actually like the fact the DLL drops the condition from the query if it's not passed - it's what allows the advanced lookups to work.

If anyone from Sage is reading this, it probably should be logged as a defect.

Jeff
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Speed issue with adding new contact/accountYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Dec 06 11:09 AM
fiogf49gjkf0d
I must be psychic as 12 x's is exactly what I used! Works a treat.

Many thanks

Nick
[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/28/2024 5:08:22 PM