Login / Register  search  syndication  about

          Jason Buss' Blog

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

Events based on history in version 6.x SalesLogix

Prior to version 7, there was limited access to those activity and history areas in SalesLogix.  In a recent project, I had to perform a series of tasks upon completing an activity with a particular Type/Category/Result combination.  This had to be done in a 6.2.1 system.  In order to do this, I had to modify the OnCompletedActivity active script.  I wanted to briefly outline the modifications I made to this area for anyone who is running an older version of SalesLogix.

Basically, I needed to look at a completed todo activity with a certain Category, and then update the associated contact and/or opportunity status values depending on the Result of the completed activity.  I created a subroutine named "ToDoActivityOperations" which I call via the Sub Main in the OnCompletedActivity Script

 

Sub ToDoActivityOperations
Dim strSql, objRS

     Set objRS = objSLXDB.GetNewRecordSet

(After creating a recordset, I open a sql statement retuning ContactID, OppID, and result from the history table that have the correct activity type)

     strSql = "SELECT OPPORTUNITYID, CONTACTID, RESULT, TYPE, CATEGORY FROM HISTORY " & _
              "WHERE ACTIVITYID = '" & vActivityID & "' and type = '" & "262147" & "'"

     objRS.Open strSql, objSLXDB.Connection

(In my next step, I check to see if any records were returned.  Then I get the values from the history record)

     If objRS.RecordCount <> 0 Then
          strOpportunityID = objRS.Fields("OPPORUNITYID").Value & ""
          strContactID = objRS.Fields("CONTACTID").Value & ""
          strResult = objRS.Fields("RESULT").Value & ""

 (Based on the result value, I call additional subroutines I've written to update Opportunity and Status record values
          If lcase(result) = "rejected" Then
             If strOpportunityID <> "" Then UpdateOpportunityStatus "Closed - Rejected", strOpportunityID
             If strContactID <> "" Then UpdateContactStatus "SRL", strContactID
          Elseif lCase(result) = "accepted" Then
             If strOpportunityID <> "" Then UpdateOpportunityStatus "SAL", strOpportunityID
             If strContactID <> "" Then UpdateContactStatus "SAL", strContactID
          Else

          End If
     End If
     objRS.Close
     set objRS = nothing

End Sub

 That was all there was to it.  It would be nice to be able to edit activity and history views, but short of upgrading to the current version of SalesLogix, this at least allows some degree of control whenever activities are completed.

I hope you find this helpful.  Thanks again for reading! Smile

 


 

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