Create subsite shortlink - sharepoint

Is it possible to create a link that creates a new subsite with my custom template apllied?
This is not supposed to be a link to the page where you can create a new subsite, but a link that actually creates the subsite with my custom template. Just like a site would be created if I pressed the "create" button on the "New SharePoint Site" page.
Is this possible? Using javascript/jQuery maybe?

I have done this in my project not using javascript or jquery but with the Server side code, you have to write a code to create a subsite using your subsite template under your site collection.
Thanks

Related

2013 reusable workflow current item values

My object is to create a 2013 reusable workflow that via rest updates a listitem in another list.
(This workflow will be copied via jsom and associated to newly created subsites, so it has to be reusable).
When I try to create variables from "Current item" the site column options are only standard. None of the custom site columns are available.
And there doesnt seem to be a way to use a specific content-type in SP2013 workflow.
Does anyone have a clue?
I ended up doing a differnet approach.
When a user creates a new project (subsite) the list item is created in the main "projectlist" and in the subsite "projectinfo" list.
I made a custom editform to use in the subsites. So when the user edites the item I save it via jsom to subsite projectinfo (where it is edited), then on the callback I update the corresponding listitem in the main project site.
Then i change window.location to the "target" from the query string.

How to: Redirect after document adding to a sharepoint document library

i need to redirect the current user to a custom url after successfully uploading a document.
the user clicks "+ new document" in the document library
the user selects a local document
the document gets uploaded and in that moment after it is successfully uploaded and the item is created in the list, i want to redirect the user to a custom url
Normally after successfully uploading a document to a document library under SharePoint 2010, the user gets a modal dialog where he sees only the field "Name" with the filename.
I want to prevent this. How could i achieve this?
Update
Isn't it possible to redirect a User after Document uploading inside a Document Library to redirect from Upload Form to a custom page instead of Edit.aspx within ann EventReceiver?
I am really frustated! I am now trying for over 3 days to get it working.
Here is my sample solution:
http://www.bog1.de/downloads/errd01.zip
You must create a document library "doclib" to get it work.
But it does not work! I have used samples from several sites. I have added the logic inside the ItemAdded event. But nothing happens. I only want to redirect the user to another page after successfully adding a document to a library. Is this such a hard problem to get it work untder sp2010?
It seems, that it is not possible in SharePoint 2010 inside an EventReceiver to redirect to a SharePoint page withoug haveing a modal dialog as in CancelWithRedirectUrl.

Email view that does not show buttons and views of other activities

I want to add Emails to navigation so It can be used like any other entity. Editing sitemap is not a problem but it does not work in the expected way.
First, of all it shows all entities, not emails only. And consequently there are filters for other activities which are unwanted.
How do I make email-view that does not show other activities?
Create a new view in CRM showing the records you wish to see
Create a HTML web resource, with an iFrame pointing to the URL of the view you just created. It will look something like this /advancedfind/advfind.aspx?AutoRun=true&QueryId=%7b495B7974-58AC-E234-92D4-EE155D107003%7d&ViewType=4230&etn=email
Point your sitemap to the new web resource

Trigger workflow from CEWP button

I have created a site workflow, now I need to trigger this manually when a button in Content Editor Web Part(CEWP) is clicked. How can I trigger it from a CEWP?
Thanks.
You cant directly start Workflows from Javascript ( inside CEWP ) using 2010 client object model. But you can always call a web service:
https://www.nothingbutsharepoint.com/sites/eusp/Pages/4-clicks-or-1-using-jquery-to-start-a-sharepoint-workflow.aspx
or use spservices
http://spservices.codeplex.com/wikipage?title=StartWorkflow&referringTitle=Workflow
I didnt find easy way of triggering site workflow from CEWP(using javascript) so i made a custom list to get updated with required parameter on click of the CEWP button( http://ishaalan.wordpress.com/2010/05/23/adding-an-item-to-a-sharepoint-list-using-javascript/ ). And made list worflow associate with that list to get triggered when a new item was added.It solved my problem.Thanks #dotsa for reply.
This could help:
http://techtrainingnotes.blogspot.ch/2015/10/sharepoint-launch-site-workflow-from.html
It explains how to attachworkflow to any button.

Creating custom WebPartZone inside a webpart

i have one Webpart which shows an image slider. The image slider will be added by getting image url from webpart toolpart . and i will bind image slider in webpart using this.controls.add() method.
Here i need to allow users to add any webpart inside my webpart by creating a webpartzone. I think it is possible.
But the problem is everytime i'll create my control and webpartzone dynamically in creatchildcontrols() method. So if the user refresh the page the webparts inside the custom webpartzone 'll be deleted. Because i am building everying dynamically.
How to persist all the webparts and webpart proprties inside my custom WebPartZone, when the page refresh.
Please someone help me.
Why do you need to add zone? You can simply use ImportWebPart and directly add the control to your controls collection.
Regarding persisting the settings, the parent web part will have to do that for the children. For this to work, you can implement an interface on your child webpart, which the parent can call to get the settings. The settings can be serialized by parent webpart and stored in its personalization database.

Resources