Login / Register  search  syndication  about

          Jason Buss' Blog

Jason Buss on SalesLogix development & customization, SQL, and more.

SalesLogix basics - Easy Data access in SalesLogix LAN

In this basics article, I wanted to outline the use of include scripts within the SalesLogix LAN client.  Specifically, I'm going to look at the standard SLX Database Support script.

Adding an Include script to either a VB Script or a Form is easy.  On toolbar at the top of the script (or script page for the view), there is a button titled "Include Script".  Clicking this button will open the Included scripts panel to the left of the code window.  Click the plus sign and select the Script to include. (There are a number of standard scripts available under the 'System' family, beginning with 'SLX'.  These hold much of the Standard functionality provided by SalesLogix.)

There are a few simple functions you can use right away.  For example, to find a single value from a table, you can use the GetField Function:

Dim sValue

sValue = GetField("ACCOUNT", "ACCOUNT", "ACCOUNTID = '{valid accountid}')

I've written some other articles about using ADO in SalesLogix and have handled creating connections myself, however these functions are already contained within the class defined in the Database Support script.

After adding the SLX Database Support to your script as an include script:

First, you have in instantiate the Class

Dim objSLXDB = new SLX_DB

Now that you have a DB object, you can reuse the object throughout your script.

For Example, if you need a new recordset:

Set objRS = objSLXDB.Recordset

objRS.Open "SQL", objSLXDB.Connection

As you can see, not only did I use my SLX Database object to create my new recordset, I also retrieved a connection through the object.

There's also an ExecuteSQL function which is handy to 

objSLXDB.ExecuteSQL "Update {tablename}..."

As you can see, the Database Support script can be very handy for performing simple tasks.  Other SLX scripts include Error Support and Debug support along with a lot of other useful functionality.  You can also create your own scripts to add your own functionality.  Creating your own include script is a great way to encapsulate your custom functionality.  I'll cover class building in a future article, so please keep reading!

Thanks!

Jason

 

 

What's This?
  
Bookmark and Share

About Jason Buss

   Jason is a senior application developer with Customer FX.



Related Content
   Saleslogix XBar Installation
When installing the new XBar application I found the instructions a little vague so I thought I would pas
Posted on Jul 18, 2014 by Mark Duthoy to SalesLogix Support
 
   "Saleslogix’s affordable pricing and usability allow the product to rise above competitors in the space" - Info-Tech Research Group, Inc.
"SalesLogix’s affordable pricing and usability allow the product to rise above competitors in the sp
Posted on Jul 14, 2014 by Scott Weber to SalesLogix Product Blog
 
   Saleslogix Default Group Layout
How can I default the formatting of columns in my Saleslogix groups?
Posted on Jul 03, 2014 by Dale Richter to SalesLogix Questions & Answers
 
   Changing Contact Process Statuses in Bulk
Recently, I was asked if it was possible to cancel a group of running contact processes.The answer is yes
Posted on Jun 30, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Finding the Current Parent Record ID in SalesLogix Web
Sometimes it's the easiest things that can be a big barrier to entry for getting started with somet
Posted on Jun 27, 2014 by Ryan Farley to Ryan Farley's Blog
 
Comments

 

Twitter Trackbacks for SalesLogix basics - Easy Data access in SalesLogix LAN - Jason Buss' Blog [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 SalesLogix basics - Easy Data access in SalesLogix LAN - Jason Buss' Blog         [customerfx.com]        on Topsy.com

June 22, 2010 10:41 AM

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2014 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register