Login / Register  search  syndication  about

          Jason Buss' Blog

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

Calling Merge Forms in SalesLogix LAN VBScript

Recently, I've been working on a customization which calls for one of a number of Merge Forms to be ran based on certain criteria.  This is a pretty simple process, and here's how I did it:

First of all, I need to get the pluginid for the appropriate Merge Form, based on my criteria.  This can be found in the "Plugin" table, based on the plugin type of 25, and the name of the Form.  In this case, these forms have been created by Admin, so the userid is the standard SYST00000001 value:

Select Case {value}

Case {condition1}

     sPluginID = GetDataValue("pluginid", "plugin", "name = 'MergeForm1' and userid = 'SYST00000001' and type = 25") 

Case {condition2}

     sPluginID = GetDataValue("pluginid", "plugin", "name = 'MergeForm2' and userid = 'SYST00000001' and type = 25") 

Case Else

     sPluginID = GetDataValue("pluginid", "plugin", "name = 'MergeForm3' and userid = 'SYST00000001' and type = 25") 

End Select

After getting the plugin, we just need to use the "MergeFromPlugin" function within SalesLogix.  This function takes a few parameters:  The first, PluginID, is simply the pluginid that I got from the case statement.  The second parameter is the Merge mode.  1 = Email, 2 = Fax and 3 = Letter.  The next parameter is ContactID, and the final parameter is OpportunityID.  The OpportunityID parameter is optional to this function.


application.BasicFunctions.MergeFromPlugin sPluginID, 2, sContactID, sOpportunityID

That's all there is to it!  This function will return a True if the merge is performed successfully, and false if not.

 Thanks for reading!  I hope you find this helpful.  :)

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

No Comments

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