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!
|
|
Custom attachments
Posted: 23 Mar 07 3:54 AM
|
fiogf49gjkf0d Hi all,
I've developed an attachments tab that is released to a set of users, trouble is the attachments are running off a drive that will eventually not be accessible to all users as some are now being set up as remotes. Is there anyway of developing something similar to the standard attachments tab where the files sync out to remotes?
All help appreciated.
Cheers, Kev |
|
|
|
Re: Custom attachments
Posted: 23 Mar 07 12:11 PM
|
fiogf49gjkf0d How are your custom attachments setup? Do they use the standard attachments table? Do they store to the standard Sync Logs\Documents folder? You'll want to make sure both of those are done. Once they are, you can use Application.BasicFunctions.LogSendFileAttachment to create the TEFs that send attachments to remotes. The only way files are sent is if they use the standard directory and attachment table but there's nothing stopping you from building a different "shell" around them.
Having said that, v7 attachment tabs are now customizable. If you plan on upgrading any time soon then your best bet would be to just convert your existing setup to use the standard table and folders. Then you can drop your code and customize the v7 interface to fit your desires. |
|
|
|
Re: Custom attachments
Posted: 24 Mar 07 10:03 AM
|
fiogf49gjkf0d If you're worried about finding the right directory on a remote or remote office, look at the the dbtype from "SELECT DBType FROM SystemInfo". If it is 2, you know that it is a mobile, and the docs are: "C:\Documents And Settings\All Users\Application Data\SalesLogix\Documents". If it is not, then use: "SELECT BO.AttachmentPath FROM Systeminfo SI INNER JOIN BranchOptions BO ON SI.PrimaryServer = BO.Sitecode" |
|
|
|
Re: Custom attachments
Posted: 26 Mar 07 3:23 AM
|
fiogf49gjkf0d Right, so there's no way of syncing out attachments without using the standard table/folders. Cheers guys I'll have to try and work something around the default attachments.
Kev |
|
|
|
Re: Custom attachments
Posted: 27 Mar 07 3:07 PM
|
fiogf49gjkf0d Correct, I don't believe LogSendFileAttachment would work with an arbitrary path because you aren't passing things like C:\Whatever.log, but the attachment/accountid of the record in the attachment table. Since attachment tables use filenames that are relative to the base directory, there's no way to place a path like C:\Whatever in the table and have it behave correctly.
That said, there have been people to claim to have successfully broken up the Documents\ directory into subfolders. There's nothing terribly wrong with the standard method other than the fact that it wants to store everything in a single flat folder. That's so DOS 1.0. |
|
|
|
Re: Custom attachments
Posted: 03 Apr 07 2:48 AM
|
fiogf49gjkf0d Hello again! I've gone down the route of implementing this into the standard attachments functionality. I'm having one problem though, when it deletes the attachment how do I get it to delete it from the remotes document directory. The delete attachment function deals with the tables but not the file.
Please help! |
|
|
|