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
   Mobile 3.0.3 for Saleslogix v7.5.4, v8.0.0 & v8.1.0 is now available!
Saleslogix Mobile v3.0.3 is now available in the customer portals. This update addresses all issues int
Posted on Apr 14, 2014 by Scott Weber to SalesLogix Product Blog
 
   Editing Filters in Saleslogix Web Client 8.0
Is it possible to add or remove Saleslogix filters from the List view in Accounts?
Posted on Apr 08, 2014 by SalesLogix Support to SalesLogix Questions & Answers
 
   Creating a Unique Saleslogix table ID in a SQL Function
A couple of months ago Ryan Farley wrote an article about how to use a SQL stored procedure to create a S
Posted on Mar 25, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Saleslogix Integration with Google - WOW!
Saleslogix will be releasing their Google Integration this month and from what I have seen, it is fantast
Posted on Mar 18, 2014 by Scott Weber to SalesLogix Product Blog
 
   Setting the Defaults on the Insert Account/Contact Duplicate Record View
When creating a new Account/Contact record in Saleslogix web, you have the ability to check for duplicat
Posted on Mar 10, 2014 by Jason Buss to Jason Buss' 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