Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 23, 2025 
 
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: Changing the Insert Lead Form
Wiley S.
Posts: 52
 
Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:11 AM
fiogf49gjkf0d

So we did a bunch of customization in the Web SLX and to the Entities. 


With the performance of the web client being so slow, I have been asked to apply the same custimizations to the LAN client instead.


 


So... I get into the Architect.  I can add fields to the form, save them, and deploy.


However, I want to save the data from my textbox back to the underlying DB entity.


In this case, the field is a Corporation name.


 


Inside the script for the page I see the current page data being saved by the PrepareLeadInfo() function.



Sub PrepareLeadInfo()


    gLI.Corporation = plCorporation.Text


    gLI.Prefix = nedName.NamePrefix


    gLI.FirstName = nedName.NameFirst


    gLI.MiddleName = nedName.NameMiddle


    gLI.LastName = nedName.NameLast


....


So I add my line above... gLI is not defined anywhere, it is just Dim'd at the top (????).

I try to open my inclides to make changes hoping I just need to define my field and I get an error about licensing.


Can anyone tell me how I can make a simple field addition to the page and have it saved in my Coropration field in Leads?


Thanks,

Wiley




 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:19 AM
fiogf49gjkf0d

Look into the "Include Scripts" linked into the Form.


 


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:28 AM
fiogf49gjkf0d

Your installation comprises a standard license only - you need a premium license to be able to open/save SLX Scripts.


Dimmed at the top means it's a global (available to other parts of the functions/subs as opposed to private to this one).


You need to find the Save routine (that physically saves it, as opposed to Preparing it).


 

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:31 AM
fiogf49gjkf0d

So am I able to make the change I have outlined above without a Premium license?  It sounds like NO.


If I cannot save the value sof form elements to the DB, changing the forms really doesn't accomplish much.  


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:36 AM
fiogf49gjkf0d

Which is why you need the premium license (otherwise, no point in having one). I'm surprised it let you open it at all (none of ours do) - but I'm not up to date with US licensing I'm afraid.

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:38 AM
fiogf49gjkf0d

Wiley:


 


  Take a slightly different approach:


 


   Locate the InsertLeadRecord function.


 


  After the Error check, it returns the LeadID. Add code in here to update the Lead Record and save your data as needed:


 


 



 


<p>    strLeadID = gLI.Insert(strError)

 


    If (strLeadID = "") Then


      If strError <> "" Then


         ShowError(strError)


      Else


         ShowError(Localize("There was an unknown error inserting the Lead record."))


      End If


      Exit Function


    End If

' Add your code Right here:

    Dim sql

    sql = "UPDATE LEAD SET MYFIELD = 'MYDATA' WHERE LEADID = '" & strLeadID & "'"

    objSLXDB.ExecuteSQL sql


    InsertLeadRecord = strLeadID


    gLastLeadID = strLeadID


End Function


 



 


 

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:39 AM
fiogf49gjkf0d

I am pretty blown away. For so many thousands of dollars, you would think you would be allowed to use your development tools unrestricted.


How much is a Premium license gonna cost I wonder.


 


Raul, I will try that now!  Thank you!


 


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:42 AM
fiogf49gjkf0d

Quote:
Originally posted by Mike Spragg


Which is why you need the premium license (otherwise, no point in having one). I'm surprised it let you open it at all (none of ours do) - but I'm not up to date with US licensing I'm afraid.



Mike:


  You don't need Premium License to modify the Forms and the Code behind the forms (Not sure about adding new Forms).

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:43 AM
fiogf49gjkf0d

Just reporting the facts. Don't shoot the messenger. And, the Includes won't help I'm afraid either - as you can't customise those either. You can only right your own scripts from scratch and modify the forms (only).

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:45 AM
fiogf49gjkf0d

Not shooting intended, Mike.  Sorry if it came off that way!  I am just complaining in general as it surprises me to hit these road blocks.


Thank you for the help!  I am going to try the route that Raul just outlined.


Of course, the next problem will be seeing if I can load the data in the Lead view after it is saved.


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:47 AM
fiogf49gjkf0d

In the UK (Standard License - which, intererestingly, is no longer sol) you can create new forms. You can open existing forms. You cannot, however, adjust the Include scripts nor create new scripts.

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:58 AM
fiogf49gjkf0d

Hmmm... So I am trying really get a grasp on the way they are developing.  I am used to C# but stepping back to VBA is not biggy.


 


So, the suggestion by Raul works for the insert.  Do I jsut reverse the process and issue an SQL command to load the fields on my form that are not part of the Scripts stuff?


 


Thx, W

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 12:05 PM
fiogf49gjkf0d

New Plugin does not appear to be an option from anywhere in the project.  


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 1:29 PM
fiogf49gjkf0d

Quote:
Originally posted by Wiley S.


Hmmm... So I am trying really get a grasp on the way they are developing.  I am used to C# but stepping back to VBA is not biggy.


 


So, the suggestion by Raul works for the insert.  Do I jsut reverse the process and issue an SQL command to load the fields on my form that are not part of the Scripts stuff?


 


Thx, W



 


You could modify any of the Existing Forms. You could modify the System:Lead Detail form (The top section of the Form). This form is Data Bound and should see any Custom fields, so you should be able to add your controls to it and then just bound it (click on the Ellipsis on the appropriate Property - e.g. Text).


 


If you want it on the Bottom grid, you could re-purpose the "Lead:Details" form. One way to do so would be by adding  Tab Control (yes, Tabs within a Tab), move all the existing Fields into the one of the Tabs, and then create additional controls within additional tabs. Then, all your customizations would be available under the Details tab, within their own "subtabs".


Where you may run into bigger issues is if you want to preserve the Data during a Conversion to Contacts, I believe most of that Code is also within the Includes, so you would have to find an alternate way to Preserve your Data and then to post it to the newly created record(s). (I could think of creative ways to do something like this - Global Variables), but off course it would all be much easier if you have the Necessary License Level.


 


Otherwise, you could get help from a SAGE BP that could create this customizations for you and give you everything on Bundles ready to apply, test and deploy.


 


 

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 5:20 PM
fiogf49gjkf0d

Thank you!  This gets me going in the right direction and some food for thought.


I will see how far I get then see if management will pony up for license upgrade.  You know how that goes...


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 7:59 AM
fiogf49gjkf0d

See if your management will pony up for speed improvements on the web side......we've got 4 big clients on 7.5.4 and have seen the complaints on speed drop down to zero.......7.5.2 or prior a whole nother issue of course.....

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 10:51 AM
fiogf49gjkf0d

Well, prior to my involvement, the decision was made to deliver 7.5.4 Web via a Server 2003 VM on top of Hyper-V. 


The physical machine is hefty with 24 Xeon cores, 32 GB memory, and a terabyte of RAID 10 space in a couple of partitions.


Other than moving to a physical server, not real sure how I can speed that up, and they won't go for that.


Any suggestions?

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 11:07 AM
fiogf49gjkf0d

You may need to really figure out where the Performance issue is coming from.


For instance, if the App is not Pre-Compiled the Server may be spending a lot of cycles compiling.


How often is the App being recycled? Does it crash often? (restarts may adversly affect your cache).


Did you check your DB Performance? At least run SLX Profiler and identify the worst performing queries and try to optimize them (if needed).


 


One of the best test to run (if possible) is to run the App on the server itself while everyone is complaining of slow response. If the app is running properly on the Server itself, that may point to Network Issues (Latency, WAN Links, VPNs, etc) that would you have to look into.


 


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 11:57 AM
fiogf49gjkf0d

Quote:
Originally posted by Wiley S.


Well, prior to my involvement, the decision was made to deliver 7.5.4 Web via a Server 2003 VM on top of Hyper-V. 


The physical machine is hefty with 24 Xeon cores, 32 GB memory, and a terabyte of RAID 10 space in a couple of partitions.


Other than moving to a physical server, not real sure how I can speed that up, and they won't go for that.


Any suggestions?



 


Well you need MachineSSSSs to run SLX fast. and taking a V8 engine and splitting it up into 8 cylinders is rarely better than running on a V8.


 


SalesLogix ONLY SQL Server 16GB+ of RAM, RAID 1+0 is fine (noted that's what you have), put the SLX OLE DB Provider ON the SQL Server if possible, physical 2Gb NIC card dedicated solely to the VMWare!


We load the entire SLX database into RAM. So currently a 6Gb database is being loaded and used about 14Gb of RAM (with the OS, etc. running).


We put the SQL Server on iron if at all possible......VMWare slows it down a tad. Nightly Full Backups, Every 30 minute Transaction Log backups WITH Update Statistics. Nighltly reindex all indexes. These are MANDATORY.


Mike Strieder's article on Indexes must be agressively pursued.


4Gb RAM Web HostSSSSS......1 server for every 50-100 users. Don't forget the Web Load Balancing Machine!


4Gb File Server (LAN Administration, Speedsearch)


4Gb Report Server (32 bit machine for ease in Crystal Reports XI installation).


SLX 7.5.4. HUGE speed improvements over even 7.5.3.


Agressive use of SLX Profiler......are you certain that user's really need all of those Groups (the one's with the mutiple OR conditions and table scans in it.....), every automagic search\update procedure that the user's THOUGHT they needed, how many retrieves of needless data are you actually making? What can a user do with 40,000 accounts?


We just took an Every Time you to an Account procedure that took up to 1.5 MINUTES to run for the bigger accounts......and moved it to an offline 1 time a night SQL stored Proc.....what a huge time savings.....


 


 


 


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 12:02 PM
fiogf49gjkf0d

The question is - what's the virtualised machine? How much of this mighty resource is allowed/constrained to the VM and what's the load (rest of it) being used for? I agree with Raul - I bet the performance has come about due to lack of pre-compilation (check processes and see if csc is being run repeatedly). Certainly, the physical host looks great - but if the VM is a single core, 2Gb server then, well, um! I doubt that - but you get the idea.

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 12:16 PM
fiogf49gjkf0d

And I agree with Mike.


 


Many times I have been given VMs that appear to be properly Sized (and configured) but once you started digging you realized that there were issues.


One of them, off course is that the Images were configured with a Given CPU (x number of cores) but only allowed to actually ran on 1 physical core.


Also, keeping an Undo log. Specially if no one is paying attention and your Log grows quite large.


 


There are many other things to look at, but the ones we have mentioned should give you a head start and maybe even help you figure out what is going on.


 


 

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 12:27 PM
fiogf49gjkf0d

To expand... Our SQL Box is dedicated big iron.  The web server is a 4 cpu/4GB memory VM.  The Reports server is too.


Total user count is 13 users.  LAN client is very fast running locally from the IIS server.  Nics are all Gb.  Load on the host machine is low.


Settings in the VM are logical processors = 4, Virtual machine reserve  = 100, virtual machine limit = 100, and relative weight = 100.


 


I think the big issue is that there is no Pre-Compile.  Raul nailed that one already.


I can see a CPU spike on each load of a main entity.  I just am not sure how to compile from command line and deply.


 


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 2:21 PM
fiogf49gjkf0d

Quote:
Originally posted by Wiley S.


I can see a CPU spike on each load of a main entity.  I just am not sure how to compile from command line and deply.



 


You can google it for more detail, but basically:


aspnet_compiler.exe SourcePath -v / TargetPath

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 2:41 PM
fiogf49gjkf0d

You don't need to - just set the site to do it during the dploy phase. There's an option on the deploy page - "Precompile" - it will do this after deployment for you automatically.


Try this: http://demo.empath-e.com:3333 login as Lee (no password). Does it run faster or slower than your site when moving from page to page - this site is precompiled.

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 2:54 PM
fiogf49gjkf0d

Mike, my Precompile checkbox has been checked since we isntalled.


It just doesn't actually Precompile.  


 


I will try to do the recompile from command line.

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 2:59 PM
fiogf49gjkf0d

I think you are confused. Are you seeing a delay when opening, say, Contacts, Accounts etc. for the first time? After that it's fine - until you come back to the site the next morning? If so, that's not precompile issue - that's the provider. IIS will shut down and recycle the site via the Application Pool it resides in. You can adjust these to remove the lag. The precompile option (which I suspect is working, the cmd line will do exactly the same thing) just compiles the .net forms & components into ascx files. As opposed to JiT. But, if it's the former issue (lag on main entities) precompile has no effect on this.

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 3:01 PM
fiogf49gjkf0d

Try our site - I've pre-awakened the main views. Now, do the same thing tomorrow morning and suspect you will see what everyone else does - a lag when opening, as the site was recycled. If it's not this - and you see a lag every time you open every form then, yes, it does look like the precompile hasn't worked.

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 3:12 PM
fiogf49gjkf0d

Mike:


 


  A couple of comments on that:


a) There are systems on which when I run the Pre-Compilation from deployment, the site doesn't appears to be precompiled once done  (no precompiled  config, all the code files are still present, no extra dlls on the Bin folder).   [I am one of them. On my Windows 2008 Web Server, my SLX Web does not compiles unless I do a manual compilation]


b) Even when the SLX Pre-Compilation works, it is a Partial Pre-Compilation. You will notice that only Code Behind files get Pre-Compiled, any C# code on the page files does not get pre-compiled (this is why it is an updatable pre-compilation, you can change code on this pages).


 


I do have a separate script (similar code to the one I supplied) that does a full pre-compilation. It may be overkill


 

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 3:17 PM
fiogf49gjkf0d

Tested your site.  Yours is faster.  Mine has lag.


 


Raul, I will see if I can figure out the precompile.

[Reply][Quote]
Wiley S.
Posts: 52
 
Re: Changing the Insert Lead FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 12 3:20 PM
fiogf49gjkf0d

So the Code Behind files are all in the root of SlxClient.


There are DLLs in the BIN folder.  There are ASCX files in sub fodlers of SlxClient.


There is no Precompiled file.

[Reply][Quote]
 Page 1 of 2Next > >> 
  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 © 2025 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): 2/23/2025 11:55:47 AM