Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 28, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Drag and drop emails with attachments
Brian Thews
Posts: 34
 
Drag and drop emails with attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Apr 09 3:12 PM
Hi, Is there a way to "disable" the popup confirmation window that always asks if the user would like to import the attachments, and just automatically bring in the attachments?

We are using 7.01

Thanks for any suggestions or hints - I have searched through all my plugins I think, and can't find this popup anywhere...
[Reply][Quote]
Veronka Capone
Posts: 113
 
Re: Drag and drop emails with attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 09 12:36 PM
if you want to do it automatically, here is how I do it:

'there is no way to bypass the user interaction when calling this function
'strAttachID = Application.BasicFunctions.InsertFileAttachmentEx(strFileName, strFileName) & ""
'to silent save the attachment:
'1) I get/set the {AccountID}, {ContactID}, and {SLXUserID} that I need.
'2) I make a call to slx_dbids("FILEATTACH") to get the new ATTACHMENTS table {KEY}.
'3) I export or copy the file to \\{server}\{attachments share}\ with the name ! and {KEY} and {filename}
'4) I insert to the ATTACHMENTS table (ATTACHID, ATTACHDATE, ACCOUNTID, CONTACTID, DESCRIPTION, DATATYPE, FILESIZE, FILENAME, USERID) the values ({KEY}, Now, {AccountID}, {ContactID}, {the name I want the file to show in the ATTACHMENTS grid}, "R" (don't ask me why), io.Filestream(filename, io.filemode.open).length, {full server filepath and filename in attachments directory}, {SLXUserID})

dim strUserID
dim strAttachmentFileName

strUserID = Application.BasicFunctions.CurrentUserID
strAttachID = Application.BasicFunctions.GetIDFor("Attachment")
strAttachmentFileName = "!" & strAttachID & strFileDesc 'input param

Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile strFileName, Application.BasicFunctions.GetAttachmentPath & strAttachmentFileName
set f = fs.GetFile(strFileName)
intFileLen = f.Size

'insert into attachment table
set objRS = CreateObject("ADODB.Recordset")
set objRS.ActiveConnection = Application.GetNewConnection

with objRS
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.LockType = adLockBatchOptimistic
.Open = "SELECT * FROM ATTACHMENT WHERE 1 = 2"
.AddNew

.Fields("AttachID").Value = strAttachID
.Fields("AttachDate").Value = now()
.Fields("Description").Value = Left(strFileDesc, len(strFileDesc) - 4)
.Fields("DataType").Value = "R"
.Fields("FileSize").Value = intFileLen
.Fields("FileName").Value = strAttachmentFileName
.Fields("UserID").Value = strUserID
.Fields("ESI_EquipmentID").Value = strEquipmentID

.UpdateBatch
end with

'cleanup
...
[Reply][Quote]
Brian Thews
Posts: 34
 
Re: Drag and drop emails with attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 09 2:07 PM
I am so sorry, I just re-read my original post and I left out a critical piece of information, I think.
This is when a user is performing an email drag and drop of an email into the system (notes/history tab).

With the above code, perhaps I am not reading it correctly, but does this apply to that situation? If so, where would I even put that code?
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/28/2025 4:11:49 PM