Using Sharepoint for attachments

Does anyone have a working solution that uses Sharepoint  for attachments?  We want to be able to add attachments to a folder and then check them out, edit them , and then return the updated documents.  With our current multi-clip attachments, we can only view the files.

 

Thanks!

Tagged:

Comments

  • We've done it here but it’s tedious to get it going.

     

    You would need to enable the SharePoint webservices  (http://_vti_bin/copy.asmx?WSDL) and create a document library in sharepoint of where you would like to store the files.  We added in a couple of fields to help with security and identification (ie FolderID, FolderName, Originator, etc).

     

    You would then create a connection in designer pointing to the copy.asmx web service.

     

    Then we used a combination of Client Side codes (Jquery) and Server side to build a control that resembles the multi-clip.

     

    Example:

     

        On the form create a label field (fileUploader) that will act like the multiclip and make it calculate based on a process variable call memSharePointFileUplooad

        On form load set the memSharePointFileUplooad =@   

           

           

               

           

                $(document).ready(function () \{                 $('\#SomeTextField1\_Editor\_Input').on('change', DetermineFileUploaderState);                 $('\#fileUploader').SharePointFileUpload(\{                   'width'  : '642',                   'height' : '125',                   'readonly'  : true,                   'site' : 'http://portal.yourcompany.com/sites/BPMRecords/',                 'documentLibraryPath' : 'http://portal.yourcompany.com/sites/BPMRecords/Your%20Company%20Invoices/',                 'documentLibraryName'   : 'Your Company File',                 'showErrors' : false,                   'fields' : \[\{                           ""Name"" : ""FolderID"",                         ""Value"" : '" + ProcessContext.FolderId + @',                         "Type"" : ""Text""                       \}\]                     \});             \});        

           

    ";

     

        From the Client Script side,  you would then need to create the DetermineFileUploaderState

     

    function DetermineFileUploaderState(evt){

        //$('#pnlTop_numDepartmentCode_Editor_Input').off('change');

         var someValue = evt.target.value;

        var folderID = getField("txtFolderID", "");

        var user = getField("lblUser", "");

     

        if((someValue!= "") && (folderID != "") && (user != ""))

        {

            allowUpload(folderID, user, someValue);

        }

        else{

            readOnly(folderID);

        }

    }

     

        Client Script to retrieve file from sharepoint in readonly mode:

        function readOnly(folderID) {

            $('#fileUploader').SharePointFileUpload('updateSettings',{

                  'width'  : '642',

                  'height' : '112',

                  'readonly'  : true,

                  'site' : 'http://portal.yourcompany.com/sites/BPMRecords/'',

                'documentLibraryPath' : 'http://portal.yourcompany.com/sites/BPMRecords/Your%20Company%20Invoices/',

                'documentLibraryName'   : 'Your Company File',

                'showErrors' : false,

                  'fields' : [{               

                              "Name" : "FolderID",

                            "Value" : folderID,

                            "Type" : "Text"

                          }]  

              });

              $('#fileUploader').SharePointFileUpload('updateUploadedFiles');

             

     

        }

     

    Our original goal was to give users different avenues to edit and manage their files... versioning file was another major factor.

     

    Hope that gives you some idea to get started.  I'm hoping someone else has a better and quicker way of doing this.