Posts

Showing posts from 2016

SharePoint 2013 Search =>Increase CutoffMaxBuckets size of the refiner

Image
As we know by default refiner cut off max bucket size is 1000. So what if some time we as the developer wanted to increase it or having a requirement where we have more than 1000 refiners values. In this scenario, if you want to increase the size of the refiner you need to update the managed property by using the following powershell command.   RefinerConfiguration CutoffMaxBuckets Property Full PowerShell code download from  Github gist .

SharePoint 2016 JavaScript framework

Image
Now As you know SharePoint 2016 JavaScript framework totally based on following technologies. you can create JavaScript web part based on following technologies. NodeJS (nodejs has npm:- package manager tool which helps developer to Find, share, and reuse packages of code from hundreds of thousands of developers — and assemble them in powerful new ways)  TypeScript  Yeoman (Provide scaffolding tool for modern webapps  , same Visual studio has templates example website, SharePoint project)  Gulp/Grunt (Task automation tool based on JS framework, will help you run the workflow example, generate your builds)  Angularjs/Reactjs/Ploymerjs  All above technologies based on "JavaScript". Microsoft developed on free tool called "Visual Studio Cod"e is a code editor redefined and optimized for building and debugging modern web and cloud applications. To connect with updates please check the Microsoft PNP page http://dev.office.com/patterns-and-practices I ha...

SharePoint 2013 Search Center In Iframe

Image
While placing the search center URL in Iframe , we got the following issue known issue(cross domain issue. ) Chrome Console error IE Error message To fix this issue we need to do the following steps. Add this line in you custom Master Page. <meta http-equiv="X-Frame-Options" content="allow" /> Add the following line your layout page. The following tells SharePoint to allow this page to be hosted in an IFrame <WebPartPages:AllowFraming runat="server" /> After done with the above changes you will face one more issue in IE , i.e. when you click the search vertical, Unfortunately, init.js throws an exception in this context (as it tries to access window.frameElement, which belongs to the other domain). MSDN mentioned same issue. To fix this issue you need to override the existing code using the monkey patch in JavaScript as discussed in this post . To fix this issue either you can place the below mentioned code i...

Send Email using SharePoint Rest API

We have a requirement to send email vai SharePoint Rest API. We dig and find the below solution to send email using SharePoint API. Point Must be remember End point " /_api/SP.Utilities.Utility.SendEmail " end point to send email.  In JSON __metadata we used the type " SP.Utilities.EmailProperties ". The User / Group must have a read permission for particular site. where we placed this site code. JS Dependency  JQuery Code URL:  https://gist.github.com/BasantPandey/05189832546f2c6cc0bd008fcfec3264#file-sharepointsendemail-js Code  var Email = function (){ // Email Either email groupname or email address var from = ' abc.yahoo.com ' , to = ' abc.yahoo.com ' , cc = ' abc.yahoo.com ' , subject = ' My Email Subject ' ; this . options = this . options || {}; this . options [ ' fromEmail ' ] = this . options [ ' fromEmail ' ] || {}; this . options [ ' toEmail ...

Search Control Template with page size drop down

Image
In OOB control template there is only 10 results per result able to view to the end user. The functionality would be handy if we provide such type of end user to change the result size itself.    So the idea just place on drop-down at the top of the search result, when user changes the drop down it will change the size of the page. To implement, we would require change the “Control_SearchResults.html” template only Following are the steps to implement drop down in Control Search results. Navigate to the search center Map “<server:Port>\_catalogs\masterpage\Display Templates\Search”. Edit Control_SearchResults.html template. Look for <div id="Control_SearchResults"> div at the top of the div placed the below mentioned code. <!--#_ Type.registerNamespace('search.Results'); search.Results = function() { return { loadMoreResults: function (value) { // Loading more results ctx.DataProvider.set_resultsPerPage(...