Hot answers tagged

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


1

The script editor web part will not execute in Google Chrome thanks to Chrome's built-in XSS Auditor. This is a feature of Chrome that is designed to mitigate Cross-site Scripting (XSS) attacks. There are ways to workaround this, but IMO a better solution is to just use JS Link. Upload the script file that you are wanting to run on the page, and then link ...


1

Instead of reusing the oListItem2 object for each new folder you want to create, try giving each new folder its own unique object. You can store them in an array like so: function storeFolderTest() { var curLibrary = empLib; var newFolders = []; // <-- new array for (var i = 0; i < arguments.length; i++) { // ... ...


1

The following worked for me. I didn't set the url like you are, just the leafname: function storeFolderTest() { var curLibrary = empLib; var l = arguments.length; for (var i = 0; i < l; i++) { var newFolder = new SP.ListItemCreationInformation(); newFolder.set_underlyingObjectType(SP.FileSystemObjectType.folder); ...


1

Yes, it is possible to create custom HTML, Javascript and CSS in your SharePoint site. A tool called SharePoint Designer is also available that shall help you to perform this. It is suggested that rather than this IDE it would better if you would use SharePoint Designer as it is designed for SharePoint specifically. You would be able to download this ...


1

If you change the column type to single line you will lose all richness and new lines. There are three things I see that you can do: Change the column type and just lose all the richness and new lines immediately. Add a new single line text column and fill it with the text from the current column, and hide the current column. This will hold your old values ...


1

Simply it's to reduce traffic. If the file haven't changed, why not just use the cached version? I have experienced this plenty of times and my workaround is always the same: If I want to make sure the file is always reloaded I add a timestamp or auto-generated guid at the end of the file reference to ensure the cache is updated everytime.


1

I am no exeprt yet, but spent the last days on CustomActions and REST because the New Library View has nothing SharePoint left but CustomActions (and no JSOM on the page it for creating/changing them) There are two types of CustomActions/Scriptlinks involved here: Type 2 = Site(Collection) Executes on every page inside the SiteCollection ...



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