Publish as major version SharePoint file with workflow 2013 REST API


SharePoint 2013 workflows has out of the box workflow actions Check In and Check Out


But does not have any actions for check in as Major version (publish)
To solve this, we can  use the "call http web service" action with SharePoint REST API.

Follow these steps to check in a File as major version (publish):

1. Create a Workflow 2013 in SharePoint Designer

2. Rename the Stage to "Published"
3. Add a Build Dictionary action and name the output variable "JSonRequestHeader". Add a string variable named content-type with the value application/json;odata=verbose and add a new string variable named Accept with the value application/json;odata=verbose and click OK

4. Add a new Build Dictionary action and name the output variable "JSonRequestParameters"
    Add a string variable named comment with the value Published by workflow


5. Check Out the file

6. Add Call http web service action with these properties:

Address
[%Workflow Context:Current Site URL%]/_api/web/getfilebyserverrelativeurl('[%Current Item:Server Relative URL%]')/CheckIn(comment='Published by workflow',checkintype=1)

RequestType: Post

RequestHeaders: Variable: JSonRequestHeader

RequestContent: Variable: JSonRequestParameters

ResponseContent: Variable: JSonResult (Create new)

ResponseHeaders: Variable: JSonResponseHeaders (Create new)

ResponseStatusCode: Variable: responseCode

7. Then publish your workflow

The final result:

Previous
Next Post »
94 Komentar
avatar

Thanks this works like a charme!

Balas
avatar

Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
Regards,
Camellia

SEO Training in Chennai

Balas
avatar

Superb i got some valuable tips from here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.

Informatica Training

Balas
avatar

your works are really great and innovative it is really amusing and good work too, so please update this kind of information more and thanks for sharing this information.


salesforce training in chennai

Balas
avatar

Hello, Thanks for the information, however when trying to apply I get a bat request message logged into the response code, If i go to the URI and paste it in the browser I get the following message:


-
-1, Microsoft.SharePoint.Client.ClientServiceException
The HTTP method 'GET' cannot be used to access the resource 'CheckIn'. The operation type of the resource is specified as 'Default'. Please use correct HTTP method to invoke the resource.


Do you know what might be causing this?

Balas
avatar

This article creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.

SAP training in Chennai

Balas
avatar


Thanks you for sharing the unique content. you have done a great job. thank you for sharing such a unique content.
SEO Company in Chennai

Balas
avatar

You did a great job.. Thanks a lot for sharing this useful informative post with us.. Keep on blogging like this informative post with us, to develop my career in the right way.

Digital Marketing Company in Chennai

Balas
avatar



Awesome..You have clearly explained …Its very useful for me to know about new things..Keep on blogging..
seo institute in chennai

Balas
avatar

Very nice blogs.We will be learning that the wonderful information.So, i would be like this sites contents.

Informatica Training | Angularjs Training | Tableau Training | Hadoop Training

Balas
avatar

Wonderful article, very useful and well explanation. Your post is extremely incredible. I will refer this to my candidates...
digital marketing company in chennai

Balas
avatar

the blog is very interesting and will be much useful for us. thank you for sharing the blog with us. please keep on updating.
ROI Services in Chennai

Balas
avatar

I keep on reading your blog post.. This was still amazing. Thanks a lot for sharing this unique informative post with us.. I really enjoyed by reading your blog post

Branding Services in Chennai

Balas
avatar

thank you for sharing such a nice and interesting blog with us. hope it might be much useful for us. keep on updating...
ROI Services in Chennai

Balas
avatar

This is really a very good article. Thanks for taking the time to discuss with us, I feel happy about learning this topic. keep sharing your information regularly for my future reference.
ROI Services in Chennai

Balas
avatar


Wow.. Thanks much for sharing.. My friend also recommended you so that i can have a helping hand to make my blog as effective as possible.

Online Training in Chennai

Balas
avatar

Truely a very good article on how to handle the future technology. After reading your post,thanks for taking the time to discuss this, I feel happy about and I love learning more about this topic. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.
Hadoop training in Chennai

Balas
avatar

thank you for sharing such a nice and interesting blog with us. i have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information. I would like to suggest your blog in my dude circle. please keep on updates. hope it might be much useful for us. keep on updating...
Software Testing Training
`

Balas
avatar


this blog is really wonderful and awesome and i got more information from your blog it is really awesome too thanks for sharing. thus i need more information from your blog and it is really very much interesting.



Android Training in chennai

Balas
avatar

It is really very excellent,I find all articles was amazing.Awesome way to get exert tips from everyone,not only i like that post all peoples like that post.Because of all given information was wonderful and it's very helpful for me




Android Training in chennai

Balas
avatar

Provides great information about the concept.It helps an individual to gain knowledge on new techniques.Keep on giving this type of information.
SEO Training in Chennai

Balas
avatar

This blog explains the details about changing the ways of doing that business. That is understand well and doing some different process. Provides he best output of others. Thanks for this blog.
Web Designing Training in Chennai

Balas
avatar

I have been following you for a couple of months now but this is my first time commenting on a blog post. Thank you for sharing your knowledge and experience with us. Keep up the good work. Already bookmarked for future reference.
Hadoop Training in Chennai
Hadoop Training
Best Hadoop Training in Chennai
Best Hadoop Training Institute in Chennai

Balas
avatar

very useful information provided in this blog. concepts were explained in a detailed manner. Keep giving these types of information.
SEO training in Chennai

Balas
avatar

I read this content really awesome.You provided another one great article.I hope this information may change my business carrier.I can remember these things whenever taking the decision.

Java J2ee training in chennai

Balas
avatar

Much thanks to you for sharing the data here. Its much useful and truly i got some substantial data. You had posted the stunning article digital marketing company delhi

Balas
avatar

Helpful as always. Every post you write produce a massive value to your readers that is the only reason it is so popular and has great authority.

Base SAS Training in Chennai

Balas
avatar

Wow amazing i saw the article with execution models you had posted. It was such informative. Really its a wonderful article. Thank you for sharing and please keep update like this type of article because i want to learn more relevant to this topic.


Tooth Braces In Chennai

Dental Hospital in Chenna


Balas
avatar

Thanks for giving the information it is useful for me.aws jobs in hyderabad.

Balas
avatar

Finding the time and actual effort to create a superb article like this is great thing. I’ll learn many new stuff right here! Good luck for the next post buddy..
SAS Training in Chennai

Balas
avatar

Nice blog with having good information. It’s very useful for everyone. Thanks and keep posting this type of blog
CCNA jobs in Hyderabad .

Balas
avatar

Really Good blog post.provided a helpful information.I hope that you will post more updates like this.
Digital marketing company in Chennai

Balas
This comment has been removed by the author. - Hapus
avatar

How many of you know about LG G7 News ?

Balas
avatar

Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
http://www.mcdonaldsgutscheine.net/ | http://www.startlr.com/ | http://www.saludlimpia.com/

Balas
avatar



This information is impressive; I am inspired with your post writing style & how continuously you describe this topic.


Pawn Shop

Pawn Loans

Pawn Shops

Pawn Loan

Pawn Shop near me

Balas
avatar

It’s the best time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I want to suggest you few interesting things or suggestions.You can write next articles referring to this article. I desire to read even more things about it..
Dental Hospital In Chennai
Best Dental Clinic In Chennai
Best Dentists In Chennai

Balas
avatar

It was indeed very helpful and insightful while being straight forward and to the point
AWS Jobs in Hyderabad

Balas
avatar

This is really a great article and great read for me. It’s my first visit to your blog and i have found it so useful and informative specially this article. I have bookmarked it and I am looking forward to reading new articles. Thanks for this article. Keep up the good work!!
Well I have also made some article hope you go through it. I hope you and your valuable readers will be like it. Happy New Year 2018 is very near. People also try to searching Happy New Year 2018 Quotes to share New Year happiness with latest collection of searching New Year 2018 Wishes. Everyone can get latest collection of quotes from the link. Thanks

Balas
This comment has been removed by the author. - Hapus
avatar

Hi, your article really nice. That is so logical and clearly explained. Keep it up! I will follow up your blog for the future post.
It was a wonderful chance to visit this kind of site and I am happy to know. thank you so much.
Isoft Innovations Company Address
Isoft Innovations Adyar
Isoft Innovations Chennai
Isoft Innovations

Balas
avatar

Great post with valuable points. Though, I would like to appreciate your both hard and smart work and you showed us how it is possible to do it. This is really a great article and great read for me. It’s my first visit to your website and I have found it so useful and informative specially this article. Thanks for this article. Keep up the good work!! Well I have also made some article for Happy New Year and i hope you go through it. I hope you and your valuable readers will be like New Year collections. You can get latest happy New Year collections from the listed links below
Happy New Year 2018 Wishes
Happy New Year 2018 Status
Happy New Year 2018 Images
Happy New Year 2018 Wallpapers
Thanks again.

Balas
avatar

Awesome post Thank you so much for this article People also like this information
Remove malware Virus from your pc Visit here I really really appreciate this article

Balas
avatar

Excellent goods from you, man. I’ve understand your stuff previous to and you’re just too excellent. I actually like what you’ve acquired here, certainly like what you are stating and the way in which you say it. You make it enjoyable and you still take care of to keep it sensible. I can not wait to read far more from you. This is actually a tremendous site..
Logistic ERP
Fleet Management Software
Warehouse Management Software
Human resources management software

Balas
avatar

It is very useful for me to have gathered some important information from these sources.



goldenslot

goldenslot

goldenslot

Balas
avatar

Nice post Thanks for sharing this awesome post This New Year
anime online

Balas
avatar

This is the best source I have found in a moment. Great writing and information.

sbobet mobile
แทงบอลออนไลน์
maxbet

Balas
avatar

Yes my friend I think it's a great story and it's really scary. Wow, I like it a lot.

บาคาร่าออนไลน์

goldenslot

goldenslot

Balas
This comment has been removed by the author. - Hapus
avatar

Great Post! Thanks for sharing it People prefer to view 123 movies. The medium does not matter much.
123movies | Watch Movies Online | Free Movies | 123movies.land | Watch Series Online Free

Balas
avatar

wow really superb you had posted one nice information through this. Definitely it will be useful for many people. So please keep update like this.

Best Dentist In Chennai
Full Mouth Implant Treatment
Root Canal Specialist In Chennai
Cosmetic Dentistry

Balas
avatar

I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again. Thanks for sharing. Keep up the good work! Also visit my website for Pohela Boishakh 2018 for Bengali New Year 2018 Celebration.Cheers!

Balas
avatar

As indicated by a few reports, it is the lawful weight which constrained the administrators to close down their tasks (123movies.in.net) . Be that as it may, no official remark has been gotten from the group yet. 123Movies Movie

Balas
avatar

CIITN is the Best Php training institute in Noida and delhi Ncr. You will get Live Project Training on PHP by our PHP expert who have 5+ year industrial experience.Focus on practical and live project training. In our PHP training, we you will learn core PHP, advance PHP, HTML, CSS, JavaScript, jQuery, Bootstrap, Cake PHP and Wordpress.CIITN provides 100% job assistance in PHP training. CIITN is well known PHP coaching center because our 100% PHP students are placed now.


Ciitnoida provides Core and java training institute in noida. We have a team of experienced Java professionals who help our students learn Java with the help of Live Base Projects. The object-oriented, class-based build of Java has made it one of most popular programming languages and the demand of professionals with certification in Advance Java training is at an all-time high not just in India but foreign countries too.

By helping our students understand the fundamentals and Advance concepts of Java, we prepare them for a successful programming career. With over 13 years of sound experience, we have successfully trained hundreds of students in Noida and have been able to turn ourselves into an institute for best Java training in Noida.


php training in noida
java training institute in noida
javascript training in noida
linux training in noida
linux institute in noida
red hat linux training in noida

Balas
avatar

This article is really awesome. Thanks for written for us. We follow your website to read your articles. Again thanks for sharing this article.
mygreatlakes
www.mygreatlakes.org
great lakes loans

Balas
avatar

Eid Mubarak 2018 In your blog I was happy to see your article, better than last time, and have made great progress, I am very pleased. I am looking forward to your article will become better and better. Thank you so much for this.

Balas
avatar

Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

Shriram Magizhchi
Shriram Magizhchi Guduvancheri
Shriram Magizhchi Price
Shriram Magizhchi Chennai
Shriram Magizhchi Apartments
Shriram Magizhchi Flats
Shriram Magizhchi Review

Balas