11/22/2024 3:55:08 AM
|
|
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!
Forum to discuss designing applications to work with SalesLogix. View the code of conduct for posting guidelines.
|
|
|
|
Question: Popups during InsertFileAttachmentEx (v7.2 SP1)
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? |
|
|
| |
| |
|
Re: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)
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 |
|
|
| |
|
Re: Question: Popups during InsertFileAttachmentEx (v7.2 SP1)
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 |
|
|
|
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!
|
|
|
|
|
|
|
|