Hot answers tagged

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


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 ...


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.


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": ...


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

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 ...


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 ...


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 ...


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 ...


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 = ...


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

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 ...


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") });


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, ...



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