Creating a repository using sharepoint - sharepoint-designer

I want to create a library in sharepoint in such a way that once a file is created in a folder it should create a folder structure as specified by us.

You can achieve this with the help of an event handler. Write an event receiver for the document library. Add your code logic in the itemadded event which gets fired when an item is created in your document library. Put logic in your event receiver that it should create a folder structure as defined by you in your code. Now deploy the code(wsp) in your SharePoint farm and it should work as expected.
Follow this link to get help about how to create an event receiver https://msdn.microsoft.com/en-us/library/ee231563.aspx

Related

How do I automatically authorize app script in a merged doc

Im a newbie to App Scrips and have challenges with having to authorize my app script to run on each newly created document.
I run a merge with Sheet data in to a Doc template (using Autocrat) and have a script (in the template) that cleans up the merged doc - onopen. The problem is that I have to authorize the script in each newly created document.
The script will only be used by my partner and I. We share GDRIVE access.
Do I have to deploy as an Add-on? Web App? Shared Lib? If Shared Lib - how do I envoke it automatically in the newly created doc?
Any feedback/guidance is much appreciated. Thank you all.
I have tired to create a shared lib, but Im not sure how to automatically included the lib in the newly created document.
Is there a good learning tool/"how to" for this?

How to disable drag and drop of folders but not files in SharePoint online Document library?

I am using SharePoint online. I have a requirement, in the Document Library users are not allowed to drag and drop folders but they can drag and drop files.
If a folder is dragged I need to show a warning.
How can we achieve this? I was trying with SPFx but had no luck. Can I add event listener to detect folder drop before it is dropped?.
Any suggestion to achieve this would be really helpful
Not sure if this is achievable. You might want to have a look into this:
How can I disable the Document Library drag and drop function?
Also you can read this ms doc:
Information about dragging files into document libraries in SharePoint Server 2013 or SharePoint Online by using a web browser

SharePoint 2013 Powershell - Moving Document Liobrary to New Site Collection

I am trying to move document libraries, from one site collection to another and retain of the metadata such as Modified By, Date Modified etc.
I have tried using the 'move' function within SharePoint 2013 Content and Structure but unfortunately this doesn't extend to across site collections.
I have tried multiple PowerShell scripts they successfully copy the file from one Site Collection to another but do not retain the metadata.
Any ideas, would be greatly appreciated.
Thanks.
have you tried saving the library as a template? You can mark the template to keep the contents.
Then you can deploy a new library from that template (Site actions / More options / Template name), and after that delete the template.
Additionally you can move it between servers. Go to the Site settings, there to the template gallery and download the template you just created. Now you can move it to another server or application.
Hope it helps.
Take a look at the SharePoint migration tools. Some of them offer free trials for limited amounts of data.

How to create CQ5 Workflow that kicks in while importing assets

I am new to CQ5 and am wondering if there is a way to add a workflow to the DAM such a way that it kicks in when the users import file(s).
The workflow needs to do the following:
Call an External API over HTTP (REST) providing the file or the location of the file
The external service will perform some operations on the file and save the file
The service will respond back with the newly saved file or the location of the saved file
Workflow continues on with whatever else CQ5 does when importing files.
I came across the DAM Update Asset workflow where workflows can be dragged and dropped. I believe for my purpose, I will have to create a custom workflow?
I am new to CQ5 but now Java. I would love some guidance on how should I go about creating this custom workflow.
I see 3 solutions here:
1. Modify the DAM Update Asset workflow
You may add a new step to the workflow you've mentioned. I suggest adding new Process step between Metadata extraction and Thumbnail creation, so you'll have all metadata, but still can modify the asset before creating thumbnails (assuming it's an image). Process step invokes a configured OSGi service implementing the WorkflowProcess. More info in the official docs.
2. Create a new workflow
Implement WorkflowProcess as above, rather than adding Process step to the existing workflow, create a new one. The Launcher tab in the workflow console allows you to bind the created workflow to the event raised after uploading new asset.
3. Create an event handler
You don't have to use workflow at all. Create a new OSGi event handler and bind it to the DamEvent.

Word Automation Service-Item Added Event not firing

I am using Word Automation Services to convert Word Documents to PDF. I have written an ItemAdded event recevier on the Document Library where the PDF document is created by Word automation services. It is not firing when the Word Automation Services adds a file to a Sharepoint document library.
If I manually add a file to debug the ItemAdded event receiver, it is getting triggered. I don't know why it is not getting triggered when the file is added from Word Automation Services.
I solved this by creating a SharePoint designer workflow with an Email Activity. It gets triggered whenever word automation services adds the converted pdf file into the document library.