Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, April 20, 2024 
 
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!
 External Development Forums - Design & Architecture Topics
Forum to discuss designing applications to work with SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Design & Architecture Topics | New ThreadView:  Search:  
 Author  Thread: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)
Taf Greenstreet
Posts: 11
 
Question: Popups during InsertFileAttachmentEx (v7.2 SP1)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 3:15 PM
Greetings!

From a VB.NET (2005) application, I'm calling to SalesLogix to attach a file for an account, like this:

Using slx_App As New SalesLogix.SlxApplication
slx_App.BasicFunctions.InsertFileAttachmentEx(strFilePathAndName, strAccountID)
End Using

My question:
How can I prevent the confirmation popup that asks for the file description? I mean, is there a way to silently just attach the file and move on?

Help is greatly appreciated. I need to routinely add 1+ attachments to 1+ contacts instantly and silently.

An extension of this question: what would the best way be to refresh the attachments grid without the user having to touch it? Sometimes I just need to attach 1 file to 1 contact and leave the contact on-screen for the user. Can I force the grid to refresh?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 May 08 8:56 PM
No way to prevent the dialog from showing with InsertFileAttachmentEx. You'd have to it all programatically (add to copy, copy file, etc). I believe the scripting forum has some posts outlining the steps.
[Reply][Quote]
Veronka Capone
Posts: 113
 
Re: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 08 8:52 AM
I am looking to silently save an attachment. Did you find the steps/script?

Please post the link if you did.

Thanks.
[Reply][Quote]
Taf Greenstreet
Posts: 11
 
Re: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 08 9:31 AM
Veronka,

I'm afraid I did have to resort to editing the database directly to accomplish this, but I'd be happy to outline the steps for you. Essentially, I've written a Library of SLX data accesses and functions to shortcut all of this.

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})

That's really it. I was always hoping to find an SLX function like Basic.Attachments.SLX_InsertFile_WithNo$#&^%#Popups(), but Sage in its infinite wisdom has not graced us with that yet.

--Taf
[Reply][Quote]
Veronka Capone
Posts: 113
 
Re: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 08 12:26 PM
Worked like a charm.

Thank you !
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 08 4:07 PM
If sync is involved you'll also need to call Application.BasicFunctions.LogSendFileAttachment so the doc is queued for sync along with the table entry. Again, the problem here is that the function is only exposed via the Application object (so the client has to be running)

-Ryan
[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 © 2024 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): 4/20/2024 5:21:59 AM