Showing posts from November, 2015

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> <FieldRefName="Status"/> <ValueType="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 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.
Framework SharePoint Code Analysis Framework-Rules: Rules for the SharePoint Code Analysis Framework…

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 1CTX 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 otherwiseSrch.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 Strategy mode) mode.Srch.U.isPageInEditMode():Indicat…

Scroll to Top Search Result Page

Scroll to Top Search Result Page” issue encounter while working with one of our client. Client has customized 2013 search center with branding (that includes all custom master page and layout pages) and because of this customization the scroll to top “OOB” functionality stop working.

I have search a lot but only find one blog related to this issue, I need to must say thanks to this post help me to investigate on it.

As per this blog you can enable this two ways.
Web Part property to set “ScrollToTopOnRedraw” option to true. ( I checked by default it true for our ‘.webpart’ webpart.Update OOB Control template “Control_SearchResults.html” template and put “ctx.ClientControl.set_scrollToTopOnRedraw(true)” function at the top of Srch.U.shouldAnimate(ctx.DataProvider))condition. Below is the code snippets. <div id="Control_SearchResults">
if (Srch.U.shouldAnimate(ctx.DataProvider))

Sharepoint 2013 CTX variable and its function part 2

This is my second post of "SharePoint 2013 CTX variable and its function" series CTX Function Part 1CTX Function Part 3 Other Utility Functions Srch.U.getFriendlyNameForFileExtension(fileExtension): Get a friendly name for file extension Srch.U.isWebPage(fileExtension): Indicates whether the given file extension is a web page.Srch.U.truncateUrl(url, maxChars): Truncates the given URL. The URL should not be encoded.Srch.U.getTrimmedString(value, cutOff): Trims the given string based on the given cut off value; adds an ellipsis if required.Srch.U.trimExtraSpaces(text): Trims extra space characters from the string.( Remove the unwanted space between, left and right form the string.)String.format(formattedstring,n parameters): Format the string based on the format and parameters.Srch.U.toFormattedNumber(num, defaultDecimalPlacesIfNotInt): Converts the number format to the given format.Srch.U.concatUrl(firstPart, secondPart): Concatenates two URL segments together.Srch.U.createXM…