back to top

Changes to the Notes History Common script in SalesLogix 7.5.1

I uncovered an interesting little change introduced in the SalesLogix 7.5 service pack 1 that led me to uncover some strange behavior with how attachments are stored against activities and history in the SalesLogix LAN client. 


A customer recently had an issue where as when right clicking on a History record and choosing “View Attachment” they would receive a dialog saying there was no attachment for the selected History record.  However, if they opened the History detail and went to the Attachment tab, there was an attachment listed.


The code that runs when the menu items are selected on the History tabs in Accounts, Contacts, and Opportunities is from the Notes History Common VBScript, which is an include file on all of the tab forms.  If we look in the ode of this script in SalesLogix 7.5.1 we can see that the following code has been added (Code shown in blue, additional code shown in red):



Sub PopupMenuClick(Sender, Item)
    Dim strSQL
    Dim objRS


    Select Case Item.MenuIndex



Case 4 ‘View Attachment
     If grdHistory.GetCurrentField = “” Then
        MsgBox Application.Translator.Localize(“Please select a record.”),,”SalesLogix”
     Else
        Set objRS = objDB.GetNewRecordSet
        strSQL = “SELECT h.ATTACHMENT, a.FILENAME, a.ATTACHID, a.DESCRIPTION ” & _
                 “From HISTORY h ” & _
                 “Inner Join ATTACHMENT a ” & _
                 “On (h.HISTORYID = a.HISTORYID) OR (h.HISTORYID = a.ACTIVITYID) ” & _
                 “Where h.HISTORYID = ‘” & grdHistory.GetCurrentField & “‘”  ‘DNL


Hmm, strange SQL join  going on here.  What gives?


Well if we look in the ATTACHMENT table we can see there are two columns contained in the table that join to either an Activity or History record, called ACTIVITYID and HISTORYID. 


SalesLogix Attachment table


Now if we actually examine the contents of the table we see something a little strange:



select * from attachment where isnull(historyid,”)<>”



SalesLogix Attachment table showing HISTORYID



select * from attachment where activityid like ‘h%’


SalesLogix Attachment table showing ACTIVITYID


Apparently, from what I can surmise, if you create a new unscheduled History record and add an Attachment the ATTACHMENT record gets created with HISTORYID populated as you would expect.  If you create an Activity, then add an Attachment and then complete the Activity the ATTACHMENT record has the ACTIVITYID value of the original scheduled activity replaced by the HISTORYID of the created History record, rather than having the ATTACHMENT row be updated as you would expect (where the ACTIVITYID is cleared and the HISTORYID column is populated).


Rather than correcting the strange behavior of how Attachments get linked to History records, the script mentioned above was adjusted to handle the behavior.


Keep in mind, the ACTIVITY column in the ATTACHMENT table is new as of 7.5.


While this particular code addresses the issue in the LAN, it would not address the potential issue of the web based Entity model where the entities can only be linked in defined relationships using one field.  If you needed to have a relationship from HISTORY to ATTACHMENTS (to see all Attachments on a History item in the entity model) you would not be able to use the built in relationship functionality.  Instead you would need to build this relationship in code.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Kris Halsrud
Kris Halsrud
Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos