I have a requirement in SharePoint online for document libraries. If the library has a mandatory field or Approval of content has enabled, whenever a document is inserted(with drag and drop) it will be CheckedOut to the inserted user. If the user unknowingly
shares this document with others, it will not be visible to others since it is never CheckedIn.
I am trying to find an optimized solution for this problem, with best practices.
I have tried the following approaches:
I am trying to send an email to the Checked out user with a SharePoint designer workflow on item creation.
For a single document library i was able do it successfully
Advantages:
** Avoiding the entire list loop trough, optimized performance
** Can over come the difficulty in finding the never checked in item from C# code(wsp).
Limitations:
** The workflow is created on single document library, Its not re-usable
To overcome this i came up with re-usable workflow on Out-of the box Document content type, so that any document library with Document ContentType can be associated with this workflow.
To achieve my requirement(mentioned above) I need the Checked Out To (CheckedoutUser-Internal Name) filed in the re-usable workflow, But for my surprise the Checked Out To(CheckedoutUser-Internal Name) Filed is not available in the Document Content type.
My question is why is the Checked Out To(CheckoutUser-Internal Name) field is not available in the Document Content type?
I want to achieve my requirement badly, So I created a Re-usable workflow on Document Content type, using CreatedBy Field. I exported the workflow as a template(wsp).
In the wsp file I edited the Workflow.XAML file to replace all CreatedBy(Author) Occurrences with Checked Out To(CheckoutUser). Then redeployed the wsp as site solution activated the wsp feature.
I have associated the my customized workflow with a document library, It was working fine.
But i have noticed, the feature in my workflow(manually edited) wsp file modified the Out of the Box Document content type to add a new Field "CheckoutUser" (Display Name), "CheckoutUser1" (Internal Name).
I don't want to modify Out of the box Document Content type to follow the best practices.
Please suggest me if there a better way to solve this problem.
Thanks in advance.
I am trying to find an optimized solution for this problem, with best practices.
I have tried the following approaches:
I am trying to send an email to the Checked out user with a SharePoint designer workflow on item creation.
For a single document library i was able do it successfully
Advantages:
** Avoiding the entire list loop trough, optimized performance
** Can over come the difficulty in finding the never checked in item from C# code(wsp).
Limitations:
** The workflow is created on single document library, Its not re-usable
To overcome this i came up with re-usable workflow on Out-of the box Document content type, so that any document library with Document ContentType can be associated with this workflow.
To achieve my requirement(mentioned above) I need the Checked Out To (CheckedoutUser-Internal Name) filed in the re-usable workflow, But for my surprise the Checked Out To(CheckedoutUser-Internal Name) Filed is not available in the Document Content type.
My question is why is the Checked Out To(CheckoutUser-Internal Name) field is not available in the Document Content type?
I want to achieve my requirement badly, So I created a Re-usable workflow on Document Content type, using CreatedBy Field. I exported the workflow as a template(wsp).
In the wsp file I edited the Workflow.XAML file to replace all CreatedBy(Author) Occurrences with Checked Out To(CheckoutUser). Then redeployed the wsp as site solution activated the wsp feature.
I have associated the my customized workflow with a document library, It was working fine.
But i have noticed, the feature in my workflow(manually edited) wsp file modified the Out of the Box Document content type to add a new Field "CheckoutUser" (Display Name), "CheckoutUser1" (Internal Name).
I don't want to modify Out of the box Document Content type to follow the best practices.
Please suggest me if there a better way to solve this problem.
Thanks in advance.