Quantcast
Channel: SharePoint Legacy Versions - Using SharePoint Designer, InfoPath and Other Customizations Forum
Viewing all articles
Browse latest Browse all 2319

undocheck out page using JavaScript

$
0
0

hi friends

i am need to undocheck out of page using JavaScript.

my scenario is

1. i have RequestList(custom list) it will have requests to edit page(page id, user name) 

2. if user try to edit page on edit mode it has to check whether request is there on request list or not. 

3. if there is no request from edit mode it has to undo-checkout and come back to display mode using JavaScript.

        var url1=_spPageContextInfo.serverRequestPath;	
	var context = SP.ClientContext.get_current();
	var web = context.get_web();
	var file = web.getFileByServerRelativeUrl(url1);
	context.load(file);
        file.undoCheckOut();	

the above code am using but it is not working 


Viewing all articles
Browse latest Browse all 2319

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>