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
   Confirming Actions With an "Are you sure?" Prompt in Infor CRM (Saleslogix)
I'm not a huge fan of bugging end users. I figure, if an end user clicked something, he or she meant
Posted on Nov 18, 2014 by Ryan Farley to Ryan Farley's Blog
 
   Infor CRM (formerly Saleslogix) Statement of Direction
Learn more about the future of Infor CRM. Recently I received my login information for the Infor Partn
Posted on Nov 13, 2014 by Brianna Ojard to The Inbox
 
   Adding a report link to the Common Tasks pane in Infor CRM (formerly Saleslogix)
When you are viewing an Entity Detail page, the Common Tasks pane on the right of the page provides a nu
Posted on Nov 12, 2014 by Jason Buss to Jason Buss' Blog
 
   Xbar for InforCRM (formerly SalesLogix) Installation Issue
After installing Xbar 1.1 on a Windows 2008 R2 server the Xbar application was not available in Outlook 2
Posted on Nov 11, 2014 by Mark Duthoy to SalesLogix Support
 
   Programmatically Using Security Roles and Secured Actions in Infor CRM (Saleslogix)
In most places in the Infor CRM (Saleslogix) web client, it's pretty easy to use security roles. You
Posted on Nov 07, 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