Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 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: Saving attachments
Glenn Williams
Posts: 51
 
Saving attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 07 8:17 AM
I know about the saveAs command, is there a Save command that doesn't present a dialog box?

Application.BasicFunctions.SaveAttachmentas(objRS.fields("filename"))

Thanks.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Saving attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 07 10:57 AM
Nope. The only way to do it without the dialog is to code it all yourself. You'd need to copy the attachment to the proper location, rename it to fit SLX naming, write the entry to the attachment table, call LogSendFileAttachment (from BasicFunctions) so it syncs properly. If this is the route you want to take, there are other posts in this forum that outline the steps more completely.
[Reply][Quote]
Glenn Williams
Posts: 51
 
Re: Saving attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 07 11:27 AM
Thanks, but I hope youv'e misunderstood me. I'm wanting to go the other way. Save from SLX to a directory. Then entry is already in the ATTACHMENT table.

again, thanks.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Saving attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Sep 07 11:45 AM
Well that is even easier. You just get the file name from the file name from the attachment table, get the attachment path from Application.BasicFunctions.GetAttachmentPath and then copy the file (sample code to copy a file below)

Dim filesys 

Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("c:\sourcefolder\anyfile.html") Then
filesys.CopyFile Application.BasicFunctions.GetAttachmentPath & attachmentfile, "C:\DestFolder\"
End If


Make sense?
[Reply][Quote]
Glenn Williams
Posts: 51
 
Re: Saving attachmentsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Sep 07 9:03 AM
Ryan,

Thanks very much for your help. Perfect!
[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): 6/20/2025 10:51:56 AM