Skip to main content

Posts

Showing posts with the label SharePoint 2013 Search

SharePoint 2013 Search Center In Iframe

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

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.

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

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 1 CTX 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): Concatena...