Skip to main content

Posts

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

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

Camlex.NET simplifies creating of CAML queries

I like this tool and would like to share with you, this tool help you create the CAML queries via using this  Camlex.NET DLL . You can download this DLL and use in your project. As per their documentation to get the following CAML query   < Where >    < Eq >      < FieldRef   Name = " Status "   />      < Value   Type = " Text " > Completed </ Value >    </ Eq > </ Where > you just need to write the following code string caml =     Camlex.Query()         .Where(x => ( string )x[ "Status" ] == "Completed" ).ToString(); You can also generate the code just put the CAML  http://camlex-online.org/  URL and generate the code.

Useful SharePoint GitHub code example & snippets

In this post I am going to share with you some of the useful GitHub codes repository that will help you to build your own  application/App in SharePoint 2013. Here are the List of GitHub Repositories  SharePoint Patterns and Practices: This is the Community Source Code location for the SharePoint and Office Patterns and Practices (PnP). We will be revising and enhancing the samples here and they should be considered just that, samples. We are working with the MSDN Content Publishing team to take the most impactful and useful samples that complete common customer scenarios and publishing them as "Solution Packs" of content as well as "Sample Packs" of sample code that has been reviewed by the Office 365 team and blessed as a recommended way to approach these scenarios. https://github.com/wobba/PnP Framework SharePoint Code Analysis Framework-Rules: Rules for the SharePoint Code Analysis Framework https://github.com/OfficeDev/SharePoint-Code-Analysis-Fra...

SharePoint 2013 CTX variable and its function part 3

This is my third post of " SharePoint 2013 CTX variable and its function " series  CTX Function Part 1 CTX Function Part 2 Other Utility Functions Srch.U.isTableTypeof(resultTable, tableTypeName) : Indicates whether the given table matches tableTypeName. Srch.U.isSubstrateTable(resultTable): true if the table is a substrate table; false otherwise Srch.U.isSPFSKU(): true if the host is a SharePoint Foundation; false otherwise. Srch.U.isSameHost(url, hostname): Indicates whether the given URL contains the same hostname. Srch.U.isRTL(): Indicates whether the document has the RTL attribute. Srch.U.isProtocolAllowed(value): true if the URL uses a supported protocol; otherwise, false. Srch.U.isPrimitive: Indicates whether the given object is a function, complex project. Srch.U.getSingleHHXMLNodeValue(xmlDoc, nodeName): Gets a single hit-highlighted XML node. Srch.U.isPageInMSdMOde(): Indicates whether the current page is in MDS(minimal Download Str...