Tag Info

New answers tagged

-1

I had a similar issue and found that SP.UI.ModalDialog.showModalDialog no longer works in SP13. See the article below: SP UI ModalDialog do not work in SharePoint 2013


1

I used this when I first created my app. First, you need both the app web url and the host web url: var hostweburl = decodeURIComponent( getQueryStringParameter("SPHostUrl") ); var appweburl = decodeURIComponent( getQueryStringParameter("SPAppWebUrl") ); Then you need to load the SP.RequestExecutor.JS file, which I did differently than what was in the ...


7

Add "?contents=1" to the url of the page. There you can delete not working webparts and also closed webparts from the page. For example: http://mywebsite/default.aspx?contents=1


0

I think I found the answer. I'd created the page as a 'non-webpart' page. When I created a webpart page I was able to add the webpart and then amened it according.


0

I'm not sure if it can be done with code. You can edit the properties of the web part in the browser, and deselect the Timeline option there, but the option is not available in the properties window in Designer.


0

the key here is to pass the client credentials to the current context! so use an account that would have privlages to search all users. You need to think of it this way... what if the user that your using doesnt have access to the group ect... thats why it works when you give a high privlage, create a new user account that would have high privlage to search ...


0

Based upon experimentation, <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" /> is required for a subsite to be created within a specific site collection. I was not able to find any link that describes the permission scopes required for various REST api's


0

You can create of list workflow that will be started when an item is created. Unfortunately Sharepoint doesn't have workflow action for posting to microfeed, but you can use 3rd party action Post to microfeed. This is a one workflow actions from Workflow Actions Pack. I participate in development of this product. It works for SharePoint 2013 as well as for ...


1

I have not yet had time to explore the full functionality but my understanding is PowerBI add: Larger workbook sizes for online viewing Ability to connect to data sources on-premise A new "PowerBI" site template is available. The biggest take away is probably the ability to utilize on premise data sources. I'd be curious to to see if anyone that is ...


0

Below proof of concept, create item and add attachment via client object model. var list = Context.Web.Lists.GetById(listId); Context.Load(list); Context.ExecuteQuery(); var item = list.AddItem(new ListItemCreationInformation()); item["Title"] = "New Item with attachment"; item.Update() context.ExecuteQuery(); var attInfo = new ...


2

Use AppCatalog class for this. Proof of concept below: class StackExchangeProof { static void Main(string[] args) { var login = "admin@yourdomain.onmicrosoft.com"; var password = "YourHardP@ssw0rd"; var url = "https://yourdomain.sharepoint.com"; var creds = new SharePointOnlineCredentials(login, ...


0

The audit API is not available via the Client Object Model. http://msdn.microsoft.com/en-us/library/ee557057(v=office.14).aspx The same question Can I Access the SPAuditQuery from the JavaScript Class Library?


0

You can potentially do that with a Content Editor Web Part if you add some (rather complex) JavaScript to it that writes the properties to the User Profile. In order to determine if the user was already shown the profile properties dialog, you can save a boolean value into a property under the user profile (such as "Profile Shown", etc.). If the value for ...


0

No OOB workflow will do that for you. You have to create a SharePoint Designer workflow that will do the following: Read the Department property Add IF conditions to check the value of the Departments property Inside each IF block, send the e-email to the correct users. Hope this helps.


2

@ericb: Excellent suggestion! ArrayOfGroups = new Array("Owner", "Member", "Visitors", "Trainers"); //could be dynamic array of group names var ctx = new SP.ClientContext.get_current(); var web = ctx.get_web(); var userGroups = web.get_currentUser().get_groups(); //as suggested by ericb ctx.load(userGroups); ctx.executeQueryAsync( function () { ...


0

The executeQueryAsync is not working because it is asynchronous so the for just ends before that you have the response. If you use recursion you can achieve it var newsArray, var index; function myExecuteAsy(newsArray,index){ if (typeOf(newsArray[index])=="undefined"){ return; } var currentContext = new SP.ClientContext.get_current(); ...


2

You don't need to loop through all groups, instead you can get the groups for the current user like this: var groups = currentContext.get_web().get_currentUser().get_groups(); It does seem spoonfeeding is the preferred approach, so I'll just leave this here: function filterNewsArrayByCurrentUser(newsArray, callback) { $.ajax({ url: ...


0

This is to remove the top bar: div#suiteBar { display: none; } and this one to remove logo SP and app Name: #s4-titlerow{ display:none!important; }


1

This is possible also in SharePoint OnLine. These are the steps that you have to do: (Go to) Sharepoint Admin -> User Profiles -> Manage User Properties -> New Property Here you have to choiche from some option. For sure you will need to make the property indexed Then go to Search -> Manage Search Schema -> New Managed Properties Here you have to ...


1

the "$limit=" option above does NOT work. however, the $top= does.


0

Are the users setting their local time zone? I can't remember off the top of my head, but the time will default to the Web Application time unless they override this and set their local on their own profile. Let me know and I can try a test.


2

I just did a simple test, and this code works just fine: var context = SP.ClientContext.get_current(); var item = context.get_web().get_lists() .getByTitle('Test') .addItem(new SP.ListItemCreationInformation()); item.set_item('MyField', ['Hello', 'World']); item.update(); context.executeQueryAsync(); And this is quite identical to your code, so that ...


0

var item; function insertItem() { var itemCreateInfo = new SP.ListItemCreationInformation(); newListItem = list.addItem(itemCreateInfo); var checked = $('input[name=' + field.internalName + 'group]:checked'); // loop through the choices and concat with ',' newListItem.set_item(field.internalName, 'Choice1, Choice 2'); newListItem.update(); ...


3

You can use JSOM as: var groupName = oListItem.get_item("FieldName").get_lookupValue(); var groupId = oListItem.get_item("FieldName").get_lookupId();


1

Yes and no. First off, in order to develop a SharePoint solution without SharePoint installed, you would have to get a copy of the ISAPI folder from the 15 hive, and you might have to make a registry change. You will not be able to debug, however. You cannot deploy it directly, but you can publish the wsp to your SharePoint Online site, and then activate ...


0

In terms of SharePoint-hosted apps, you can deploy seamlessly to a local SharePoint farm or to SharePoint Online just by setting the "Site URL" property of the app project to the appropriate URL.


1

On the Autohosted app you haven't the standard SharePoint libs because it's hosted on Azure. So you haven't any SOD or js files that usually you can use with a SharePoint hosted app That means that you have to create your modal dialog window


0

Using SP.File.copyTo Method in REST endpoint, it is supported to copy files within a site only, for example: executor.executeAsync({ url: "<app web url>/_api/SP.AppContextSite(@target)/web /getfilebyserverrelativeurl('/Shared Documents/filename.docx') /copyto(strnewurl='/foldername/filename.docx',boverwrite=false) ?@target='<host web ...


2

Yes that is possibile. You have to modify a file under Master pages and page layouts of your site. When you click there you will have a list of directory. So go trough: Display Templates -> Search -> Item_Default_HoverPanel.js My suggestion is have a copy of that file and the *Item_Default.js* on your system. Rename those like My_Item_Default* and do your ...


1

According to SharePoint 2013 User's Guide: Learning Microsoft’s Business Collaboration Multiple instances of the same workflow cannot run on a single item at the same time GoogleBook


0

I faced this problem today in Client Object Model, it seems like it doesn't support comparing to strings either with == or Equals method. .Where(n => n.ReceiverName == "List_Events") this is what is causing the issue.. You might need to Load EventReceiverDefinitionCollection webEvs object and than iterate through the collection to match the ReceiverName ...


2

Inside the custom page that you're opening in a popup, add a checkbox or button (Don't show this again), then bind click handler that creates a cookie (username, showPopup) Inside your function, function initialize() { var context = new SP.ClientContext.get_current(); var web = context.get_current(); // 1. get current username // 2. check if the ...


0

I think, that best way is use cookies. And every time, before show popup to user, check cookie variable of user choice.


0

Use as below: SP.SOD.executeOrDelayUntilScriptLoaded(initialize, 'sp.ui.dialog.js'); function initialize() { var context = new SP.ClientContext.get_current(); var web = context.get_current(); OpenPopUpPageWithTitle(url, callback, width, height, title) }


0

Setting Title value The line: listItem.set_item("Title", Title.name); is used for setting Title column from Title.name object. Are you using something like this to initialize Title object? var Title = {}; Title.name = $('#title').val(); Ensure sp.js library is loaded In order to ensure that sp.js is loaded, change function your function to ...


0

While developing the apps in development environment you can use SPFastDeploy tool to make the updates with out redeploying everything. In case of production you can try to use the UpgradedEventEndpoint web service to preserve the data. ...


1

In addition to Azure SQL DB and SharePoint Lists, the following option could be considered: SharePoint PropertyBag Many of the important SharePoint client objects support a Properties property: Web Folder ListItem File This property returns a property bag object, which is a collection of key/value pairs. Each key must be uniquely named, each value is a ...


0

In addition to republishing the content types from the hub, you will need to go into every subscriber (consuming) site collection -> content type publishing -> Refresh all content types. Also, the content type hub timer job and content type subscriber timer job(s) need to be run.... Which you don't have access to with SharePoint online (at least I don't ...


1

You can use the automatically created crawled properties but there are some rules you need to follow unless you want to write your own code. The details are outlined here: http://technet.microsoft.com/en-us/library/jj679902(v=office.15).aspx Two point that I think are important: "When you search for a crawled property, you may find two crawled ...


1

No, That is not possible. The Site Mailbox in SharePoint is really just a Shared Mailbox in Exchange. Anyone that has access to the site can click "Site Mailbox" and have access to OWA for that Shared Mailbox. There is no way for the document to get out of exchange and into SharePoint without you doing it. You should look into OneDrive if you want to ...


0

Yes, you can use a script to determine the presence of a user in the group: function isCurrentUserInGroup(groupName, functionUserInGroup, functionUserNotInGroup, functionGroupNotFound, functionOnError) { var ctx = new SP.ClientContext.get_current(); //Get info of current user var currentUser = ctx.get_web().get_currentUser(); ...


1

You could specify in Query which items to exclude from results. For example, the following query: <Neq><FieldRef Name='FileDirRef' /><Value Type='Lookup'>/project/Lists/Tasks</Value></Neq> will exclude all task items from Tasks list located on Project site.


0

What you want to do is create a custom "Refiner Control Template". You can find them in All Files -> _catalogs -> master page -> display templates -> filters if you are in SharePoint Designer. The key function you will want to look for is probably names "outputFilter" and rValue for the text that actually prints on the screen. Right before the text is ...


1

Try adding the following code for folder creation. //Enable Folder creation for the list list.EnableFolderCreation = true; list.Update(); context.ExecuteQuery(); //To create the folder ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation(); itemCreateInfo.UnderlyingObjectType = FileSystemObjectType.Folder; ...


0

You can also create new Managed Properties for Text and Yes/No types. If you need additional Managed Properties you have to map crawled properties to the built in Managed Properties Date00, Date01, Decimal00 etc. If you need Refinable properties Microsoft supplies you with RefinableString00, RefinableDate00 etc. Usually there are 10 or more available, but ...


2

When a template is specified, the data is returned from all lists of that type and as mentioned by @Robert, you will then need to filter the returned object. However, there is other way in which you can specify the IDs of the lists instead of template. Example: <Lists> <List ID="7A9FDBE6-0841-430a-8D9A-53355801B5D5" /> <List ...


2

You can not do that in the query, if you want to use SPSiteDataQuery you will have to do this filtering on the returned objects


0

They are almost uneditable. But there are tho tvingas you can do editing a managed property: Advanced Searchable Settings: Enables viewing and changing the full-text index and weight of the managed property. Add Mappings to crawled properties and the list shows all the crawled properties that are mapped to this managed property. A managed property can get ...


3

Instead of a network credential, you will need a SharePoint Online Credential: http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.sharepointonlinecredentials_members(v=office.15).aspx


2

It is not a bug.Site Templates does not retain the Security settings.Site templates do not include the following items: Customized permissions, running workflow instances, list item version history, workflow tasks associated with running workflows, people or group field values, taxonomy field values, publishing pages and publishing sites, My Sites, and ...



Top 50 recent answers are included