Can Appscript or Modscript read in External Files and attach them to items?

Hello,

We are migrating attachments from another tool into SBM.

The SBM records should have the filenames within them. So, I would like to create an Appscript or Modscript to read the items filename and then go out to a directory and upload the file as an attachment. 

Is this possible and does anyone have a code sample? 

Regards,

Will

 

Parents
  •  Is this a one-time-only import?  If so, it might be easier to create the attachment and attachment sequence records in SQL.

    Even though you've configured attachments to go into the database, I'm betting that you can put the file into the file system, create records in TS_ATTACHMENTS and TS_ATTACHMENTSEQUENCES and the file will be magically imported into the database (the TS_BLOBS table) after you restart SBM.

    The trick is that you need to be comfortable doing things with the SBM database and definitely need to know the table schema.

     

Reply
  •  Is this a one-time-only import?  If so, it might be easier to create the attachment and attachment sequence records in SQL.

    Even though you've configured attachments to go into the database, I'm betting that you can put the file into the file system, create records in TS_ATTACHMENTS and TS_ATTACHMENTSEQUENCES and the file will be magically imported into the database (the TS_BLOBS table) after you restart SBM.

    The trick is that you need to be comfortable doing things with the SBM database and definitely need to know the table schema.

     

Children
No Data