We recently had a request to capture the changes made to a grid on an Opportunity Tab in SalesLogix.  The three items requiring capture were:

  1. Any time a record was deleted
  2. Any time a record was added edited via an Add Edit Form
  3. Any time a check box in the grid was checked or unchecked

To implement this we simply created a function that would insert a record into the History table and would accept the OpportunityID, Description, Notes, and LongNotes as parameters.

The pseudocode:
Sub InsertHistoryRecord(strOpportunityID, strDescription,strNotes, strLongNotes)
       dim Variables
       Create RecordSet
       With Recordset
           .Open "SELECT * FROM HISTORY WHERE 1=2", objSLXDB.Connection
           .Fields("HISTORYID") = strHistoryID
           .Fields("ACTIVITYID") = strHistoryID
           .Fields("TYPE") = "262156"
           .Fields("NOTES") = strNotes
           .Fields("LONGNOTES") = strLongNotes
           .Fields("ATTACHMENT") = "F"
       End With
End Sub

Then we inserted a call to this procedure on the grid's OnCheckColumnToggle, the function that deleted records, and the form that added or edited records.  We wrote this custom procedure so that the history record creation would be seemless to the user and so we could control the data as we wanted.

Posted in:

Start a Project With Us

Submit your email below to get in touch with our team.