Options

File Attachments

erugalathaerugalatha Member Posts: 120
Hi,

What is the best way to handle file attachments in Navision? Are there any add-on's/downloads that you know of that handle attachments nicely?

Thanks for any help.

Answers

  • HalMdyHalMdy Member Posts: 429
    Check Attachment Management in the Interraction Mgt of the Relationship Mgt.


    This part of code could be reused to attach files to others elements like Customers or Items. With some programming of course ...
  • erugalathaerugalatha Member Posts: 120
    HalMdy,

    This seems to be related to attachments to emails ... I was not specifc enough in my first post.

    I meant how can I store a file in a navision table. For example if I wanted to attach a file to an item.

    I'm thinking I would create a file attachment table that is linked to the item table.

    Then I think have two possible options:

    1. store the file in a blob in the table
    OR
    2. store a path to the file in the table and store the actual file on disk in a local folder.

    Which is best or add your own suggestions.
  • DakkonDakkon Member Posts: 192
    I prefer storing on disk and keeping path references. I dislike storing lots of attached files in blob fields since this clogs up the database needlessly.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • HalMdyHalMdy Member Posts: 429
    erugalatha :

    No, it's not only for e-mails. You can use this fct for any files. Make a test : create an interraction (a phone call) and the try to attach to it a Word file.

    You could reuse Table 5062 records with Storage Type = Embelled to store your attachments.

    Dakkon :

    Disk storing is hardware and network definition dependent. If you change somethink (ex : name or path to the file server), you loose all file connexions. Storing in the DB as embelled files could increase the DB size but when you do a backup/restore of the DB, you save also all your attachments, that could be a great advantage.
  • DakkonDakkon Member Posts: 192
    Well I think it goes without saying that if you have a mapped drive store that the database links to that you would want to back it up as well:)
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
  • erugalathaerugalatha Member Posts: 120
    Hi,

    I weighed up the pros and cons of both options outlined above and decided to implement both. :)

    i.e. I decided that (from previous experience) it easily happens that file paths change and files get deleted from network drives. Disk space is cheap and the type of attachments we are using are rarely over 1 MB in size so now my modifications to the Service module stores attachments in BLOB and also copies the attachment to network drive.

    I also found it easier to get my head around retrieving the file from a BLOB than from disk so now when a user wishes to view a file that is already attached it gets that file from the BLOB field.

    Thanks for help.
Sign In or Register to comment.