Login / Register  search  syndication  about

          Jason Buss' Blog

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

Useful Functions from the SLX_Common script (SalesLogix LAN)

The SLX_Common script included in SalesLogix contains a number of simple, yet useful, functions that you can use within your own functionality to save yourself some time by not having to reinvent the wheel each time you need some simple functionality.

  • GetItemIndex(Control, Value)
    • This function returns the index for an item within a control such as a ComboBox, CheckListBox, ListView, ect.  Basically, any control with an "Items" property.
  • SLXIsNumeric(Value), NulltoZero(Value), CheckForNull(Value), CheckForNullDate(Value)
    • This series of functions can be used to evaluate a number of different datatype for null or blank values.

There are a number of functions to provide some basic calulations commonly performed against currency values:

  • CalculateAdjustedPrice(Price, Discount)
  • CalculateDiscountPercentage(AdjustedPrice, PriceBase)
  • CalculateExtendedPrice(AdjustedPrice, ExchangeRate)
  • CalculateLocalPrice(AdjustedPrice, ExchangeRate)
  • CalculateExtendedPriceLocal(Quantity, PriceLocal)
  • ExtendedPricetotal(objRS)
    • ExtendedPriceTotal will total up all records from the passed recordset, where the fieldname is "Extended")

There are also a couple of scripts to help with SQL statements:

  •  GetSQLConditionClause(Index, strFltText), GetSLXConditionClauseEx(Index, strFltText, strField)
    • The Index number passed corresponds with the type of query to run... (0 = Like with wildcards, 1 = Like, 2 = Equals To, 3 = Not Equal To, etc...)
  • AddToWhereClause(Field, Clause, Where), AddToWhereClauseEx(Field, Clause, Where, Condition)
  • AddCommaDelimatedTextToWhereClause(intCauseIndex, strWhere, strText, strField)
etc...

This is just a short list of some of the functionality available in this particular script.  Other useful functionality is available in this, as well as many other scripts which are included within SalesLogix.  In addition, if you're relatively new to VB scripting, these scripts provide some invaluable examples for how Subroutines and Functions can be built within the SalesLogix client.

  Jason

What's This?
  
Bookmark and Share

About Jason Buss

   Jason is a senior application developer with Customer FX.



Related Content
   Fixing the Orphaning of Salesfusion Data when Converting Leads to Contacts in Infor CRM (Saleslogix)
We have had a couple of client recently come to other with the same problem-When you convert a Lead to a
Posted on Sep 19, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
   Official Infor CRM Acquisition FAQ
What to expect now that Saleslogix is Infor CRM. Like many of you, it will take some time (probably a
Posted on Sep 18, 2014 by Brianna Ojard to The Inbox
 
   ComboFix Kills Saleslogix Sync
ComboFix, a third party malware utility, will alter the Operating system so .qts and .que files will no l
Posted on Sep 12, 2014 by Brianna Ojard to SalesLogix Support
 
   How do I access the new Opportunity that I created in Saleslogix??
I had a user ask why they could not access a Salelogix opportunity when they clicked the hyperlink from t
Posted on Sep 04, 2014 by Dale Richter to SalesLogix Questions & Answers
 
   Retrieving Items from a Picklist via Javascript
Saleslogix is very light on how to use client side processes to do things in the Saleslogix web client.&n
Posted on Aug 29, 2014 by Kris Halsrud to Kris Halsrud's Blog
 
Comments

 

Twitter Trackbacks for Useful Functions from the SLX_Common script (SalesLogix LAN) - Jason Buss' Blog [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Useful Functions from the SLX_Common script (SalesLogix LAN) - Jason Buss' Blog         [customerfx.com]        on Topsy.com

July 19, 2010 8:54 AM
 

Jason Buss' Blog said:

I've previously posed about a number of useful functions available to you within the SLX_Common script in the LAN version of SalesLogix. I'd like to go a little further in-depth about a couple of functions which are helpful for creating new SQL

September 20, 2010 3:48 PM

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