06-24-2014 03:04 PM
a - v7.5.4 WIndows/LAN system w/several Remote Users - system has been in place since
b - NO Customs in or related to ANY of the Attachment Forms/scripts including any/all related VBScript Include files
When a user clicks on the Attachment Tab in the Contact MainView an error is thrown. We have seen one (or both) of the following depending on a combination of things:
A - An error occurred when executing active form script (Contact:Attachments).
Error in include script (SYSTEMLX_COMMON): Item cannot be found
in the collection corresponding to the requested name or ordinal. at
line 481, char 12.
B - Error in IDispatch.Invoke(): 0x80020101
What was causing the problem:
It turns out this is a "variable" issue - specifically in the VBscript include file SYSTEM:ATTACHMENT SUPPORT in the OnFormOpen Sub. When this code was (initially) modified back in version 7.0 HF3 to deal with issues related to (remote) attachment support - the variable "strSQL" was NOT declared locally (no DIm strSQL) in the subroutine. It turns out the script also has three include scripts. One of them being SystemLX Database Support (first one). Within this script (and "global" to the script) is a "dim strSQL". It was there in the original 7.0 NOT for Attachment SUpport but for SLX_DB (vbscript) class!
Does this error happen on all SLX systems - NO.. it does not. I could not replicate it in my test/dev VM. However, it happens with significant consistancy at the customer site on the server as well as their Windows 7 (32 bit) systems.
How to Fix:
In SYSTEM:ATTACHMENT SUPPORT VbScript:
Sub OnFormOpen Dim strSiteCode Dim col InitSec Set col = grdAttach.Columns.Item("A2_STATUS") 'DNL If Not (col Is Nothing) Then col.Visible = Not gBlnHostDB Set col = Nothing End If strSiteCode = Trim(GetField("PrimarySite", "UserSecurity", "UserID=" & AddSingleQuotesToString(Application.BasicFunctions.CurrentUserID))) strSQL = grdAttach.SQL strSQL = Replace(strSQL, "ON (A1.ATTACHID=A2.ATTACHID)", _ "ON (A1.ATTACHID=A2.ATTACHID) AND (A2.SITECODE='" & strSiteCode & "')") if grdAttach.BindID = "" Then 'we do not want to hit the DB with an empty id (and get back a gazilliob records), but we do need 'to modify the SQL to include a join on SITECODE grdAttach.BindID = "INVALID_ID" 'DNL End If grdAttach.SQL = strSQL End Sub
Sub OnFormOpen Dim strSiteCode Dim col Dim strSQL '
06-24-2014 03:09 PM
06-24-2014 05:28 PM
Yep.. know about the Contact:Tickets.. ;-)
Of course there's the bug w/the Attachments having a name that's too long. Documents will xfer accross on synch but never
move" to their final destination on either the main db nor teh remote(s) . Unfortunately there's no good way to fix that one :-(