Tag Info

New answers tagged

0

I ran into this problem also. I suspected what was happening was that while the code is delaying for 'SP.js' to load, 'clientTemplates.js' is running full steam ahead and calls RenderListView() before the code can execute RegisterTemplateOverrides(). My answer to this was to leverage @Aveenav's answer to overriding the BaseViewId on Using Different ...


0

I asked a question with an impossible solution. However.. By using Realistic's solution on this question Copy document from one site to another..? I was able to perform most of the actions I needed to using Jquery SharePoint services. It was pretty simple to find examples of all the SPservices actions I needed just by searching google.


0

You can use getFolderByServerRelativeUrl only in your current web (website). You cannot go to another website, because you are asking web.getFolderByServerRelativeUrl - if you want to get the file from another website, ask that website. In SP2013 I would advise you to use REST api. https://msdn.microsoft.com/en-us/library/office/dn450841.aspx Since your ...


0

Sharepoint saves the DateTime in UTC, so in order to retrieve the desired value you should save DateTimeOffset.Now.


1

The method SaveAsTemplate is not exposed in CSOM API, there is a general suggestion opened: http://officespdev.uservoice.com/forums/224641-general/suggestions/6527561-expose-list-saveastemplate-for-csom-api Basically you can create lists using already existing custom templates, but programmatically you cannot create new ones. ...


2

Yes, definitely. No. But the real question is: why would you want to distribute these server-side DLLs? They only work on a SharePoint server...


0

Instead of LINQ you could use CAML: Get files by file extension. Get files by file type. If using LINQ is very important you either have to fetch all files and then filter them by LINQ (much more data over the network, but easier to read and write the code). You can do this by calling ToList().Where(file => ...) on your collection after ExecuteQuery. Or ...


1

You cannot use executeQueryAsync in a loop, the loop execution does not wait for the execute Query call completion(it is async). So try to load all items once and call 'executeQueryAsync' outside of the loop and also we should not create the clientContext and list objects inside the loop(if so, only the last object inside the loop will have correct context ...


0

To create a publishing page using either Out of the box or a custom page layout following is the code. There are 2 things you need to keep in mind to follow the below function If you are using OOB page layout, then we are using CAML query to get page layout as an item If you are using a custom page layout, then we are using a path to get page layout as an ...


0

I had the same error message in a html without SharePoint Server rendering. For me I mixed up the load sequence of the sp.runtiem.js and sp.js. You have to load the sp.runtime.js before the sp.js <head> ... <script src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script> <script ...


2

Why donĀ“t you use "OpenBinary" Methode of SPFile, hold the stream in Memory and save it to the ftp-Server?


2

Get a list of fields first, then iterate them, if needed check for conditions (read only, visible etc.) and then display the values: var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); var list = web.get_lists().getByTitle("ListName"); this.listFields = list.get_fields(); clientContext.load(this.listFields); ...


0

You can use Lists.asmx web service to get the data. Lists.GetVersionCollection returns the XmlNode for a field. You'll have to add the web service as a web reference to your VS project after which you'll be able to use it. See: MSDN Source


0

You can use this code for updating Text,Number,Lookup,Content Type,Single Select managed Metadata columns fields using REST API: item = { "__metadata": { "type": "SP.Data.ABCListItem" }, "Title": "Name", "Name": "Name field", "PId": 736, "short": "short desc", "long": "long desc", "category": "High", "status": "New", ...


1

I know this question is old but it might help someone doing Research on this. I recently wrote a script to figure out access rights and found something that might help. Here is a simplified Version from the object model to illustrate what i mean: Web -----> RoleAssignments -----> Member -------> ...


2

SPQuery query = new SPQuery(); query.Query = @"<Where><Eq><FieldRef Name='Author' LookupId='TRUE' /><Value Type='Integer'>" + _id + @"</Value></Eq></Where><OrderBy><FieldRef Name='Created' Ascending='False' /></OrderBy>"; where _id is user's ID.


0

Nevermind, changed var hostWebContext = new SP.ClientContext(PoxtaOnline.Utils.Url.getQueryStringParameter('SPHostUrl')) for var hostWebContext = new SP.AppContextSite(context, PoxtaOnline.Utils.Url.getQueryStringParameter('SPHostUrl')) and changed this hostWebContext.load(asyncObjects.sectionGroup); hostWebContext.load(asyncObjects.sectionList); ...


1

Replace <Where> <IsNotNull> <FieldRef Name='CheckoutUser' /> </IsNotNull> </Where> with <Where> <Geq> <FieldRef Name="CheckoutUser" LookupId="TRUE" /> <Value Type="int">0</Value> </Geq> </Where>


0

To get the checkbox in front of the country Name you can do like this: You can either use REST or SPServices for this, I have done this using SPServices, $().SPServices({ operation: "GetListItems", async: false, listName: "Country List", completefunc: function (xData, Status) { if(Status == 'success' ) { ...


0

Answered here. used Microsoft.SharePoint.Client.File.SaveBinaryDirect http://stackoverflow.com/questions/17057074/how-to-download-upload-files-from-to-sharepoint-2013-using-csom


0

You need to pass stream of Bytes or Byte array which you are supposed to save to the file.


0

If I understand your question correctly, you could have a look at SP.Web.getSubwebsForCurrentUser Method (sp.js). It will return a collection of child sites of the current site based on the specified query. For more detail, have a look on this MSDN reference.


2

There is all sorts of ways to skin this cat. Add a Custom Action which can only be used once Use CSR to render a button for each item This all requires some coding. For quick prototyping I stuff HTML+JavaScript in a Calculated Column (and then instruct the 5 US$ an hour programmers in India to replicate the behaviour in more solid code, although to be ...



Top 50 recent answers are included