Hot answers tagged

4

Have you tried moving your code into the jQuery.getScript() success callback? Like this: $.getScript(hostweburl + "/_layouts/15/SP.RequestExecutor.js", function() { var executor = new SP.RequestExecutor(appweburl); // rest of code... });


2

It seems you ESI_ProjectSeqNoLookupId is lookup column. If it is true, then your approach is not correct. Correct Approach Let's say, lookup column name is ESI_ProjectSeqNoLookup. Now the query should look like query.RestQuery = ...


2

You're writing it wrong. You need to use $filter= to filter results.


2

SPWeb.EnsureUser(logonName) should add a user account to the site, which is what happens when the user has been "used" on the site (or even just visits the site, which presumably they haven't since they are new users). Once the account is added to the site, you should then be able to get the principleID for it. According to the JSOM reference for ...


1

You can read all the users that are given direct permissions on the site from the "Users Information List". You can query this and retrieve only items which have content type "Person", and for each of them you would have to make a request to the PeopleManager to get their Date of birth. From Below given reference URL you can find information on how to get ...


1

Still this no API for retrieving all user profiles from SharePoint Online You can get current user's profile _api/SP.UserProfiles.PeopleManager/GetMyProperties Or a particular user's profile by login name /_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|xx@siteurl.onmicrosoft.com' BUT You can get available ...


1

Install the OData Query Builder available (for free) in the App Store https://store.office.com/odata-querybuilder-WA104051159.aspx?assetid=WA104051159


1

i believe you can't filter hyperlink column via rest. What you can do is use caml query with Rest api, that will solve your issue. Here are the important things about it: A REST request with a CAML query is always a POST request A REST request with a CAML query has always to have X-RequestDigest http header (actually because it is a POST request) A REST ...


1

If you are going to be writing managed code (C# or VB) then you should use the Client Object Model (CSOM). It has better documentation, the API has more coverage, it requires less lines of code, and it has better tooling in Visual Studio. If you are going to be writing JavaScript, my suggestion would be to start with the JavaScript version of the Client ...


1

For me : 1- Yes they are two different ways to retrieve data from SharePoint (Technically speaking). 2- for the name SharePoint rest api and SharePoint Search rest API (See MSDN) 3- Yes both are active and present in SharePoint 2016 4- the difference is one is based on search services, so need to take care about indexing and planning your search schema ...


1

Or you can add a select option to your rest call to specify the fields that you want. This can solve your problem if you don't want all the lookup fields. Have a look here about select: https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection0


1

Try writing this $.getScript(hostweburl + "/_layouts/15/SP.RequestExecutor.js", getSubSite("/Test 2")); like this instead $.getScript(hostweburl + "/_layouts/15/SP.RequestExecutor.js", function(){ getSubSite("/Test 2"); }); to avoid immediate execution of the getSubSite method ( = to wait until SP.RequestExecutor.js is actually loaded)


1

The correct one is https://sitename/_api/web. If you type this URL in a browser like Chrome, it should display the current site information in XML. Also check your protocol, it might be https instead of http. If you still get the error than you need to download the SP 2013 Client Components SDK & brought up PowerShell V3 Use below mentioned code in ...


1

If you are developing a mobile app which will communicate with your SharePoint 2013 then you can use the common services that can be accessed using open protocols. If your REST Service API codes are hosted in your SharePoint environment then in that case you do not need any authentication mechanism. But if your code is hosted somewhere else other than ...


1

You first need to make a POST request to http://<DomainName>/home/_api/contextinfo to get a request digest. Then you'll have to add that as a header X-RequestDigest to your actual POST to add the list item. The token is valid for 30 minutes, I believe, so you may want to cache it if you are expecting this procedure to be accessed multiple times within ...



Only top voted, non community-wiki answers of a minimum length are eligible