Guidance on importing notes with attachments

Hello -

We're converting data in the Sugar Cases module. Rather than try convert all the detailed messages back and forth between us and a customer on a single case, we're going to create a PDF of all the activity from the legacy system.

Then we'd like to IMPORT the Case information - and then import a PDF for each one into a Note/attachment.

Importing the basic NOTE isn't a problem. But we can't find any detail - either in the manuals or in the community - about how to import/relate the attachments.  We found the information that says the attachments are in the /Upload/ folder and that Sugar gives them the same GUID as the Note they're attached to.  But that's where things stop.  We obviously don't want to put 5,000 PDF files in the /Upload folder and then go manually rename them with GUIDs after we upload their related Notes.

Can anyone point me towards the solution.  I can't help but think that I've missed something in the Admin guide or other documentation.

Thanks very much.

Parents
  • Hi Bob Bundy 

    The files attached in the Notes can not be imported at all, instead you need to copy the PDFs files into folder upload/ ($sugar_config['upload_dir']). The name of the target file to be related to a given Note MUST be exactly the "id" of that Note.

    On importing Notes you must make sure you properly populate the fields file_mime_type, filename, file_ext and file_size.

    Basically you need to prepare the import csv according to those fields, from related files. Then you need to import the Notes, fetch theirs IDs and finally copy the files into upload/ folder accordingly.

    Good luck!

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • Hi Bob Bundy 

    The files attached in the Notes can not be imported at all, instead you need to copy the PDFs files into folder upload/ ($sugar_config['upload_dir']). The name of the target file to be related to a given Note MUST be exactly the "id" of that Note.

    On importing Notes you must make sure you properly populate the fields file_mime_type, filename, file_ext and file_size.

    Basically you need to prepare the import csv according to those fields, from related files. Then you need to import the Notes, fetch theirs IDs and finally copy the files into upload/ folder accordingly.

    Good luck!

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children