back to top

Follow-up to Changes to the Notes History Common script in SalesLogix 7.5.1

In an earlier post I talked about how SalesLogix introduced a fix to the Notes History Common script in the SalesLogix LAN client to handle how HISTORYIDs are stored in the ATTACHMENT table.  I discovered today that another related area in the same script, as well as in another screen remains unfixed.


In the Notes History Common script, when you choose to view Attachments on the History screen’s context menu it will check to see if there are more than one attachments defined for the history record.  If there are, it will launch a screen to allow the user to select the attachment to open.  This functionality is handled in the “InvokeHistoryAttachmentView” routine.  The code looks like the following:



Sub InvokeHistoryAttachmentsView
    Dim objMainView, objDetail


    Set objMainView = Application.MainViews.Add(“System:View History Attachments”, 0, True)  ‘DNL
    objMainView.BorderStyle = 3
    Set objDetail = objMainView.DetailsView
    objDetail.Caption = Application.Translator.Localize(“View Attachments”)
    objDetail.grdAttach.BindID = grdHistory.GetCurrentField(“HISTORYID”) ‘DNL
    objMainView.ShowModal
    Set objDetail = Nothing
    Set objMainView = Nothing
End Sub


The problem is that they are attempting to bind the grid to only the HISTORYID field of the Attachment table, when we know based on my last post that this is not always where the HISTORYID is stored.  Instead this code needs to be changed to:



Sub InvokeHistoryAttachmentsView


    Dim objMainView, objDetail
    Set objMainView = Application.MainViews.Add(“System:View History Attachments”, 0, True)  ‘DNL
    objMainView.BorderStyle = 3
    Set objDetail = objMainView.DetailsView
    objDetail.Caption = Application.Translator.Localize(“View Attachments”)
    objdetail.grdattach.sql.text=”SELECT A1.ATTACHID, A1.DESCRIPTION, A1.FILENAME FROM ATTACHMENT A1 WHERE A1.HISTORYID = ‘” & grdHistory.GetCurrentField(“HISTORYID”) & “‘ or A1.ACTIVITYID='” & grdHistory.GetCurrentField(“HISTORYID”) & “‘”
    objdetail.grdattach.refresh
    objMainView.ShowModal
    Set objDetail = Nothing
    Set objMainView = Nothing


End Sub


 


This will correctly allow the attachments for history records to show.


One additional thing


With the changes listed above, you will correctly be able to see the dialog appear and list the attachments for the current History.  However if you try to open one of the attachments from this dialog you will receive an error, something in reference to invalid parameter for OpenSelectedFile.


This is because the  dialog screen that opens has another bug currently.  If you open this form (System:View History Attachments) you will see in its code space that there is only one routing called “cmdOKClick”.  This is the event that attempts to open the attachment specified by either clicking the button or double clicking the grid. The code looks like:



Sub cmdOKClick(Sender)
    OpenSelectedFile Application.BasicFunctions.GetAttachmentPath & grdAttach.GetCurrentField(“FILENAME”), _
                     grdAttach.GetCurrentField(“ATTACHID”), _
                     grdAttach.GetCurrentField(“DESCRIPTION”) ‘DNL
End Sub


Now if you look into the include file of this form, you will see the OpenSelectedFile routine only accepts two parameters, not three as it is currently.  To fix the error, you can change the code to the following:



Sub cmdOKClick(Sender)
    OpenSelectedFile Application.BasicFunctions.GetAttachmentPath & grdAttach.GetCurrentField(“FILENAME”), grdAttach.GetCurrentField(“DESCRIPTION”) ‘DNL
End Sub


These changes should fix everything.  Hopefully Sage will address these in SalesLogix 7.5.2.  Better yet, they will change the incorrect behavior of storing the HISTORYID of ATTACHMENT records.  For now, following these chnages will give you the functionality that is missing.

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