New answers tagged

0

Added I.P. Address and localhost to the hosts file. Also added to the DBObjects Owner groups in SQL Server.


0

This might not answer your question. Search is not real time. In your case it's a single list and you can query the list using CAML. To optimise performance you can index the fields you are querying.


0

It was just a matter of creating the "ctx" (ClientContext) from the same location where the object is being shared. So the clientcontext needed to be dynamically created with the object parent url. ex: Object url: "/sites/intranet/project/Shared Documents/document.aspx" ClientContext: "var ctx = new SP.ClientContext("/sites/intranet/project/")


0

OOS/WAC rebuild the metabase, which is why this isn't recommended, though if I recall as long as you're not using tcp 80/443/808/809 for your IIS Site, you can co-host. Likely fine for dev, but I'd suggest finding an alternate location for prod.


0

If you are developing SharePoint Provider-Hosted Apps, then you don't want to do a SP2013 empty project. That is designed for a server-side WSP solution, which requires you to run Visual Studio on the SharePoint Server itself - so, to create an empty 2013 project you'll need to be on the WFE box. Do you get the same error if you try to create an "App for ...


0

I had to do something similar recently, this worked for me: foreach (var list in lists) { string listName = list.Title; CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = "<View Scope=\"RecursiveAll\"><RowLimit>1000</RowLimit></View>"; ListItemCollection collListItem = list.GetItems(camlQuery); ...


0

Try below code: function getList() { clientContext = new SP.ClientContext.get_current(); //pass your proper ClientContext web = clientContext.get_web(); colList = web.get_lists(); clientContext.load(colList); this.listInfoCollection = clientContext.loadQuery(colList); ...


0

You need to add a client Web Part, but doing the following: "Right-click the SharePoint Add-in project (not the web application project), and then choose Add > New Item > Office/SharePoint > Client Web Part (Host Web). ("Client Web Part" is another name for "add-in part".)" (reference: https://msdn.microsoft.com/en-us/library/office/fp179921.aspx) While ...


0

Try changing the Site URL in your VS Project properties with the web application URL in your CA > Manage Web Applications.


1

First make sure that your Application Pool & SP Site are running in IIS. You will able to fix with the help of this link Steps from the Site Check what user vssphost14.exe (or vssphost15.exe) is running as (Generally the same user you are using to run VS) Launch SQL Management Studio and connect to your SharePoint SQl Instance ...


2

I was able to do this while writing a JS in app.js in SharePoint Hosted App on very first line so that the first thing it will activate the side loading feature as this feature does not have any button by which we can activate. So we need to go with the Feature GUID. Please go through the given article Enable Side Loading Feature Please let me know whether ...


2

var clientContext = new SP.ClientContext.get_current(); this.oWebsite = clientContext.get_web(); gives you the web https://<tenancy_name>-<autogenerated_number>.sharepoint.com/sites/<development_site>/<addin_name>, so the code is actually querying the add-in web, not ...


2

In SharePoint Hosted App, You can use jQuery.ajax directly. There is no need to use SP.RequestExecutor.js. SP.RequestExecutor.js does not have any option like beforeSend:fn. In SharePoint Hosted App, execute jQuery.ajax request like following: jQuery.ajax({ url: _spPageContextInfo.siteAbsoluteUrl + url, type: "GET", headers: { "accept": ...


0

I just added "all users" active directory group to the app catalog site collection with "Read" permission and now users are able to view and add App uploaded to the App Catalog site.


-1

You have to remove the new keyword var clientContext = new SP.ClientContext.get_current(); should be var clientContext = SP.ClientContext.get_current();


0

If it's a web application use jquery plugin like jquery fileTree. http://labs.abeautifulsite.net/archived/jquery-fileTree/demo/


0

Try to alter the width of the Webpart or add the same number columns as in your All Documents view so that the width will be adjusted.


1

The reason behind this may be you do not have registered your app with appregnew.aspx with proper domain and redirect url. If you have done this then another possibility is that you do not updated your web.config and AppManifest.xml file with proper ClientId and ClientSecret key. If this also done then while packaging your app you didn't provided ClientId. ...


1

Using below methods you will get SPHostUrl and SPAppWebUrl. In hostweb you will get your "sharepoint.com" url. // read URL parameters function getQueryStringParameter(param) { var params = document.URL.split("?")[1].split("&amp;"); var strParams = ""; for (var i = 0; i &lt; params.length; i = i + 1) { var singleParam = ...


0

SP.PageContextInfo.get_siteAbsoluteUrl(), will give you the Site Collection URL. SP.PageContextInfo.get_webAbsoluteUrl(), will give you the Site (or subsite) URL.


0

You can add just a timeline web part where the tasks will not show up. To do so add a web part on your page under Content Rollup -> Timeline. After the web part is on the page you can configure the settings to display which list you want.


1

No, you cannot elevate privileges in JavaScript CSOM, nor would you want to. Remember there is nothing stopping end users from crafting their own scripts and running them via a developer tool like IE's Developer Tools or Firebug. If you could elevate privileges via JavaScript, it could mean disaster on your Farm as regular users could just write a script ...


2

You can not use elevated privileges in Client Object Model. This would open up a huge security hole. You can use elevated privileges on SSOM, where are supposed that the deploy of a page or component has been approved by someone. Instead anyone could execute client code from anywhere and hack a site.


0

Try this code from MSDN: https://msdn.microsoft.com/en-us/library/office/jj163201.aspx function createListItem(siteUrl) { var clientContext = new SP.ClientContext(siteUrl); var oList = clientContext.get_web().get_lists().getByTitle('Announcements'); var itemCreateInfo = new SP.ListItemCreationInformation(); this.oListItem = ...


-1

Please refer below link which help to read and write the term store set in sharepoint hosted app click here


1

In SharePoint Formulas only double-quotes " are string delimiters '<A href="#"><span class="fa-stack fa-lg"><i class="fa fa-square-o fa-stack-2x"></i><i class="fa fa-download fa-stack-1x" data-toggle="tooltip" data-placement="bottom" title="Download this File"></i></span></A>' Must become: "<A ...


0

Yes, the acronym is often used interchangeably, SharePoint hosted apps would require JavaScript CSOM whereas Provider hosted apps can work with the Managed (C#) Client Object Model as well


1

Instead of Value use some other column name in the list. I have used Test in my case. then do the following code changes in onGetConfigValuesSuccess function function onGetConfigValuesSuccess() { var OrgLogoUrl; var OrgName; var listItemEnumerator = collListItems.getEnumerator(); while (listItemEnumerator.moveNext()) { var ...


0

The subject and tagging are conflicting as tag is about Online but otherwise text speaks of 2013. As Hardik said, this is not possible in SharePoint Online. In on-prem SharePoint 2013 the List View threshold can be increased on web application level from Central Admin. Navigate to Manage web applications, select the web application in question, under ...


0

You can't change the Threshold value for list in SharePoint Online. To work around this issue, review the recommendations, techniques, and tips outlined in the "Ways to manage lists and libraries with many items" section of the "Manage lists and libraries with many items" guidance located at the following Microsoft website: Manage lists and libraries with ...


0

Getting the files and folders, from the library is not a big deal you use CSOM/REST Api calls recursively and can get the complete folder structure. But list like UI is almost not possible in the provider hosted addin. You can try the latest Office Fabric UI, to match look n feel but it won't give you all the features like list view.


0

As mentioned app is built using REST and angular js , key is to modify web.config where we have to define ADFS provider and URN related so that app gets authenticated independently as stated in below article. Please ping me if you need any help on the configuration. ...


2

It's achievable through PnP PowerShell CmdLets, you need to install the msi before using it. SPOAppPackage -Path c:\files\demo.app -Force Refer to other switch parameters for more options. More details here


0

Posting the answer from comment Here's a blog that explains how to use CSOM in powershell scripts with O365.


0

I've just faced the same issue and steps below fixed it for me: SharePoint stuck removing the app because it can't find app package because deployment was cancelled. Upload app package to App Packages and try to remove app again.


0

Regarding your comment, you should keep your Xml definition. you can control the visibility of the button from JS using the QueryCommand attribute of the button. This command will allow you to control from a JS component if the button is visible or not. Take a look at Sample code: Asynchronously checking if a Ribbon command is available. As an example, in ...


0

Running as LocalSystem has its own set of issues and is not recommended. Since I am not as qualified as others to speak to this, and I do not want to plagarize someone else's work, I will just steer you to the de facto definitive resource for this on Spencer Harbar's website. ...


0

PowerShell did not help... Health Analyzer 'Repair Automatically' did not help... (saw errors in the ULS logs that it tries to access the site...that does not exists anymore and so cannot remove the app) Only solution left: Remove those records from the AppInstallations table in the content database.


0

You are not allowed to modify app-contents via cross-domain. But there are possibilities to get the current design from within the iframe. //Build absolute path to the layouts root with the spHostUrl var layoutsRoot = strHostUrl + '/_layouts/15/'; //Create a Link element for the defaultcss.ashx resource var linkElement = document.createElement('link'); ...


0

I use a function like this to add the standard tokens to a URL. Pluralsight.UrlUtils.addStandardTokens = function(url) { var tokens = ["SPHostUrl", "SPAppWebUrl", "SPLanguage", "SPClientTag", "SPProductNumber"]; for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var value = GetUrlKeyValue(token); if ...


0

The issue is that when you navigate to another page you're losing the query strings in the URL. I get around this by appending the query strings to my hyperlinks in the onclick attribute: onclick="window.location='time.aspx'+window.location.search;" So full example: <a style="cursor:pointer;" ...


2

Moving forward you shouldn't be looking at sandboxed web parts as an option anymore. In your case you should go for an app. It might seem so at first, that SharePoint Online is limited, but you can achieve almost the same functionality (user wise) as with an on-prem solution. The main difference is that you don't have access to some of the configuration ...


0

I just had a similar case and for me, the solution was, to create a root site collection (/) on the same web application that I was deploying my app, after this the app stated working normally, with all CSS and JS and all show as it should. This might be related to the SharePoint Hosted apps using some files/resources from this root site collection.


1

This is the way I used function updateMasterFile() { clientContext = new SP.ClientContext('/'); this.web = clientContext.get_web(); clientContext.load(this.web); this.masterGallery = this.web.get_lists().getByTitle("Master Page Gallery"); this.clientContext.load(this.masterGallery); clientContext.executeQueryAsync(Function.createDelegate(this, ...


1

You must explicitly load the MasterUrlproperty like this: var context = new SP.ClientContext.get_current(); var web = context.get_web(); context.load(web, 'MasterUrl') context.executeQueryAsync(function(){ var masterPageName=web.get_masterUrl(); console.log("masterPageName is :"+masterPageName); }, function(a, error){ alert("ERROR") });



Top 50 recent answers are included