Tag Info

Hot answers tagged

3

Batching is now supported in REST O365 only. You can check out a javascript library on GitHub that batches these for you using the new capabilities. https://github.com/SteveCurran/sp-rest-batch-execution


3

Below example demonstrates how to customize List View in order to highlight list item rows. Assume there is a Tasks list and depending on status, rows have to be highlighted using the corresponding color. Template code: SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { ...


2

Change The console app is configured for .Net 4, any CPU. to The console app is configured for .Net 4, X64. Also, as Amal said, run the console as administrator in the same box as you have SharePoint installed. Also, Run with Elevated Priviledges in a console does nothing. RWEP only removes the Impersonation and goes back to the Account that ...


2

It depends, some Apps would have their files & items in the App web as the App would be a stand alone App, and it won't interact that much with the host web. Other Apps would need the host web to reference files provided by the App, so they tend to store these files & create items inside the host web.


2

The main reason for me would be that the data is more persistant in the host web, it will stay there even if you reinstall your app or delete your app (if you want it to). If stored in the app web it will be deleted on updates and uninstallation of the app.


2

Garima's answer is fine but the problem is the PersonalUrl can be overwritten by the user. It remains as MySite Url when its pulled back in the code if its blank but if the user enters a value you get back that value instead of the MySite Url. A better function to use is get_userUrl(). So I'd change the above code to be: function getPersonalUrl() { var ...


2

The problem is with the use of OnDemand=true. If you set that property than you are asking Sharepoint to only load the scripts on demand i.e. when you explicitly call them. This techique is used to reduce the amount of scripts loaded at page load. When applied script can be requested to execute by using SP.SOD.execute or SP.SOD.executeFunc methods. .master ...


2

Here are couple of points which can help you Find all custom Solutions - For this you can open Central Administration -> System Settings -> Solutions Now using PowerShell you can download those solutions from the Development Server $farm = Get-SPFarm $file = $farm.Solutions.Item("solutionname.wsp").SolutionFile ...


1

Try using below code if($("input[Id^='Title']").val().trim() == "") { bvalSubmit = false; }


1

SharePoint pages are, by default, associated with site definition files. When a master page is customized in SharePoint Designer, it is no longer associated with the site definition. This can result in additional administrative work following future updates or upgrades to SharePoint, which is why you see this message. You can always reset the master page to ...


1

I believe you are formatting the data using CSR. In that case you have full control over how the data will be rendered. Hence the easiest way to tackle this is, add the field to the View and then using CSS/JavaScript hide the fields you don't want to display. Else you should make another service call to get the data. Here is a sample you can try with ...


1

Yes you can do so. The compatibility of what you can use depend on the type of browser you're using to use your App, not SharePoint itself. To have a guidance of what you can do, use this site: http://caniuse.com . It will help you determine which browsers will suport your HTML5 tags.


1

You can use REST Endpoint SP.Utilities.Utility.SendEmail for sending mails in SharePoint Hosted app. Example: Function sendEmail(from, to, body, subject) { appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl')); hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl')); var urlTemplate = appweburl + ...


1

Chris O'Brien has this wonderful series on apps. One of the articles mentions about adding fields and content types in Host Web. The app needs to be given Full Permissions on the Host Web and all provisioning needs to be done using code. /// <reference path="jquery-1.7.1.js" /> /// <reference name="MicrosoftAjax.js" /> /// <reference ...


1

please refer a great article by Chris O'Brien for provisioning Content type in host web. He has used CSOM to provision content type. http://www.sharepointnutsandbolts.com/2013/06/sp2013-host-web-apps-provisioning.html


1

I think you should change your approach. Create webpart zone in the place of Search WebParts. Then while creating the page choose this new layout. Then edit page and add the Search WebParts. If you have made customizations to the Search WebPart which you want to reuse, then "Export" the webpart and then upload it to the webpart gallery as a new webpart. ...


1

Why it didn't work with workflows? Did you make sure that the workflow is running on item created on List1? Did you make sure you're not testing the workflow with System Account? If you've seen the workflow "In Progress", did it throw any errors?


1

Host-named site collections and Path-based site collections. Will not copy&paste a full technet article to this answer, as it doesn't make much sense, but the differences are discussed here. Regarding Web Applications, there is really just one type, but you can configure it in so many ways, so effectively you have almost unlimited number of variations. ...


1

You can add additional lookup field or select lookup field as ID in field settings: To Select Lookup Field as ID instead of Title: To Select ID as well as Title


1

The first way is kind of manual way where you are creating the SPWeb object and then disabling the property of the object. The second way is the correct method. It uses the Out of the box PowerShell CMDLet to disable the feature. If you are planning to disable for all then use foreach($webApp in Get-SPWebApplication) { foreach ($SPsite in ...


1

You can assign multiple people in task list, for that you do following. Go to List settings --> Click on Assigned To column, then Under Allow Multiple selections, select Yes radio button. If you have built this as an app then you might need to specify in the people picker that multiples are allowed.


1

After googling I found one solution that if we omit RegistrationId and RegistrationType attributes from <CustomAction>, we can hide the button. The actual reason behind this is not yet clear to me but working like charm!!! Now my custom action is containing following code. <CustomAction Id="RemovePublishButton" Location="CommandUI.Ribbon"> ...


1

Related: SharePoint object model: connect to remote server? Is it true that your app has to be on the same farm as the web app context you're trying to open in your code? Yes it is true as Amal and the link above said. If not and it's a problem with my code, what is the proper way to do what I'm attempting here? You can use CSOM, or ...


1

If you are using Server Side Code then your application should run from the Same FARM. Else you should use Client Side Object Model.


1

You can use following code in the display template <div title="_#= $htmlEncode(line4.defaultValueRenderer(line4)) =#_" id="_#= line4Id =#_"> _#=STSHtmlDecode(line4.value)=#_ </div> Source - https://ingessharepointnotes.wordpress.com/2014/03/04/sharepoint-display-templates-display-enhanced-rich-text-field/ Another example var desc = ...


1

Add a Hidden field to the page. Then on the Page_Load event of the webpart, set the value of the hidden field to the webpart property value. Now using JavaScript, handle the document.ready event and read the hidden field value. Reading WebPart Properties using JSOM //pass in the web part ID as a string (guid) function getWebPartProperties(wpId) { var ...


1

Make sure the Page is published and approved. View the page source and make sure the element is present. Try to place the script inside window.onload event window.onload = function(){ var element = document.getElementById('myDiv'); alert(element); }


1

You can use Visual Studio 2013 Community Edition to build both SharePoint Apps and SharePoint Solutions. Just follow the steps under "Set up your environment" found here: http://dev.office.com/getting-started


1

Can't give a definite answer without seeing the environment, but I would try, in order: IISReset (could be a simple caching glitch) Clear browser cache (from the F12 menu) Temporarily set the master page back to default and see if the issue recurs. Make a copy of the library and check if it recurs there


1

In the SharePoint website, go to the library which stores the files you wish to extract. Click the Library option at the top of the page. Among the many confusing buttons is one that says "Open with Explorer." Click this to open the library in Windows [File] Explorer. From here you can select multiple files and drag&drop or copy&paste into a folder ...



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