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
   Preserving Custom Roles, Secured Actions, and Assignments in Infor CRM (formerly Saleslogix) Upgrades
When upgrading between levels of Infor CRM one of the tasks that is commonly needed is to run a batch/exe
Posted on Dec 16, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Easily Showing and Hiding Tabs at Runtime in Infor CRM (Saleslogix)
Showing and hiding tabs in the Infor CRM (Saleslogix) client should be an easy thing. It should be someth
Posted on Dec 16, 2014 by Ryan Farley to Ryan Farley's Blog
 
   Telnet Sample to Send an SMTP email
I am always forgetting how to test sending an email through an SMTP gateway using the Telnet client. 
Posted on Dec 12, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Problem setting SLXTextbox enabled property / Setting unexposed base control properties for a custom control
I recently had an issue with a Quickform where I was attempting to set the Enabled property of a TextBox
Posted on Dec 05, 2014 by Jason Buss to Jason Buss' Blog
 
   Checking Infor CRM (Saleslogix) Picklists for valid data
This week I received a question about a particular picklist. One of the picklist items, when chosen, wou
Posted on Dec 05, 2014 by Dale Richter to Infor CRM Questions & Answers
 
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