Skip to main content

Does anyone have a suggestion for how to move a completed Smartform (filled in and approved per the workflow) to a Sharepoint Library and then email it to a person?


 


Environment is Sharepoint 2013 with K2 4.6.11.


 


Thsi may not be the most elegant way of doing it so I am open to alternatives. Here is what I have so far.


 


The Smart Object, Views and Forms were generated from a Sharepoint List.   The form moves through a multiple approvals workflow in K2 Designer for Sharepoint. The last display form contains everything that needs to be captured, including a "PDF Save Control" and an "Approved" button.    The form has a view on it (with a File Attachment control) that I generated from a sharepoint library.  Clicking the "Approved" button on the form fires a rule to accomplish two actions: (1) create and save a pdf snapshot of the filled in form and (2) load that snapshot into the File Attachment control.  Also I can run the smart object tester and see a display of the pdf file under the load method.  So now I have a form with a pdf snapshot of itself loaded in a file attachment control. So far so good.


 


When I add the action to upload the document to the library, it throws this error:


 


"SmartObject property FileLeafRef is a required property for selected method UploadDocument.  FileName property must be set"


 


When I run just the view with a file attachment, it uploads a test file into the library just fine.  It is something about running a view created from a SP library inside of a form created from a SP list.  Although the error is mentioned in other articles, I did not see anything that could fix this.


 


Alternatively I could just add the pdf as an attachment to the sharepoint list item but when I change the list settings to include attachments and then attempt to regenerate the smart objects and forms, it throws a "server error".


 


Any further alternatives would be appreciated.


 


Thanks,


Susan


 


 


 


 

Just an update on what I have since figured out.


 


First, I was able to get the PDF screen shot to attach to the List Item in Sharepoint with this rule setup.


 


 10725iEEFFD6B6C184D629.png


 


Second, I've learned that enabling list attachments after already applying K2 to the Sharepoint list will result in there being no attachments item reference in the context browser for steps in the workflow.  Regenerating the Smart Objects, Forms and Views does not fix it.  I will be pursuing this further but for now my advice is to always have list attachments enabled for your new Sharepoint Lists before you add K2 to the list - just in case you discover that you need it later.


Reply