Showing posts from August, 2017

Sharepoint Search Refine by date


Add Promoted Links Web Part as part of the Page Layout SharePoint 2013

< WebPartPages:WebPartZone ID = " WebPartZone " runat = " server " FrameType = " None " >   < WebPartPages:XsltListViewWebPart      ID = " XsltListViewArticlePromotedList "       runat = " server "       ListUrl = " Lists/myList "       IsIncluded = " True "       NoDefaultStyle = " TRUE "       Title = " Images used in switcher "       PageType = " PAGE_NORMALVIEW "       Default = " False "       ViewContentTypeId = " 0x " >     < JSLink > ~site/SiteAssets/PromotedLinks.js </ JSLink >   </ WebPartPages:XsltListViewWebPart > </ WebPartPages:WebPartZone >

jQuery modal dialog inside SharePoint

opening a JQ modal in sharepoint comes with some troubles. 1st since JQ creates the modal OUTSIDE the body, initialy in order to let the modal hover over everything, it does it with some nice calculations. but with SP CSS's and HTML structure that doesn't work well, and sometimes you just don't see the modal, and sometimes you see it wierd. in some cases the JQModal appendTo Property can do the job, but sometimes the best way is to give up jQuery's calculations and just fix the modal's position' and it can be done like that, using destroy since some calculations must be done again while position is not fixed: $( function HP_ready() {     $( ".popup" ).on( "click" , function HPs_popupClick() {         $( ".salaryPopup" , this ).dialog({             bgiframe: true ,             width: 965,             modal: true ,             autoOpen: true ,             draggable: false ,             dialogClass: 'salary

JAVASCRIPT בסיס בעיברית

אנא הסתכלו על השגיאה הזו פה למטה, ואני מאוד מבקש מכל מי שלא יכול לאמר לי בדיוק מה השגיאה רק מהסתכלות על התמונה הזו שיקרא בעיון את המייל הזה והדוגמא שלו. אז אם אתה אחד מאותם חברים יקרים שרוצה ללמוד, אנא פתח במקביל את ה JSBIN הזה שהכנתי במיוחד, ובצד ימין אפשר ללחוץ על הכפתורים clear ואח"כ run כדי להריץ מחדש, וכן כולם מוזמנים לערוך, זה לא יצור גרסה חדשה לכולם אלא מקומית לכל אחד,console רקע בסיסי – JS זה שפה שבין היתר מבוססת SCOPE , כלומר כל אובייקט ופונקציה זה SCOPE משל עצמו, שמהווה CHILD ל SCOPE  שמעליו, כאשר הגלובלי, ה ROOT SCOPE , הוא ה WINDOW . חלק מהמנגון הזה אומר ש child scope כאשר הוא מחפש איזה פרמטר/פונקציה אם הוא לא מוצא את זה אצלו הוא יחפש אותו אצל אבא שלו, סבא שלו, סבא רבא וכו'. אז אם נלך לדוגמא שלנו אנו רואים פרמטר בשם globalVar שמוגדר ב ROOT , מה שנקרא גלובלי, ולאורך כל הדרך, בכל מקום בעולם שנחפש אותו אנו תמיד נמצא אותו. לאחר מכן יש לנו פונקציה (וכל פונקיצה היא אובייקט וכל אובייקט הוא פונ

Sharepoint Edit mode catch PostBack type (save, publish, ect.)

PageStateGroupSaveAndStop: means the user clicked "Save" PageStateGroupSave:   means the user clicked "Save and keep editing" PageStateGroupPublish:   means the user clicked "Save and keep editing" if (  Page . Request . Params [ "__EVENTARGUMENT" ] == "PageStateGroupSaveAndStop"    // שמור   || Page . Request . Params [ "__EVENTARGUMENT" ] == "PageStateGroupSave"        // שמור והמשך עריכה    || Page . Request . Params [ "__EVENTARGUMENT" ] == "PageStateGroupPublish" )   // פרסם   {

Sharepoint Error Creating a List

activating feature, while provisioning a list (or creating), this happened to us with Genesis: The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B) we just has a space in the url WebRelURL = "Lists/CbsEventsRegistered ", we just removed the last space and the problems was solved. as a conclusion, this error might indicate just a wrong character somewhere in the list or column settings in the schema.

Sharepoint Updating / Changing Lookup Fields from code

unfortunately the only way to do it correctly is to change the SchemaXml itself for most changes like ListID or ColumnID ect. here is a Sample: public static void FixLookup ( SPFieldLookup lookupField , Guid newListGuid ) {     Log . Application . Info ( "FixLookup" );     if ( lookupField . LookupList != newListGuid . ToString ())    {       Log . Application . Info ( "update schema" );       int startIndexOfList = lookupField . SchemaXml . IndexOf ( "List" );       int startIndex = lookupField . SchemaXml . IndexOf ( "\"" , startIndexOfList ) + 1 ;       int endIndex = lookupField . SchemaXml . IndexOf ( "\"" , startIndex );       int countIndex = endIndex - startIndex ;       string oldGuid = lookupField . SchemaXml . Substring ( startIndex , countIndex );       lookupField . SchemaXml = lookupField . SchemaXml . Replace ( oldGuid , newListGuid . ToString ());       lo

Sharepoint Bcs to DB no results (Hebrew)

we had a situation where we connected to a db with Hebrew content and we got empty results. well, 1st of all we removed special characters form the columns name (a dot). then the Hebrew content we put inside brackets "{}".

Sharepoint Search Crawl error with BotDetect

this is what you may see The SharePoint server was moved to a different location. ( Error from SharePoint site: HttpStatusCode Redirect The request failed with the error message: --< html><head><title>Object moved</title></head><body>< h2>Object moved to <a href="/_vti_bin/sitedata.asmx?AspxAutoDetectCookieSupport=1">here</a>.</h2>< /body></html> --., CorrelationID: 6f92129d-4742-20cf-86da-6e46bae7318e; SearchID = B83C0CF2-2B3E-4047-AC33-ADD06488B452 ) we dont understand why but it only happens when the BotDetect is configured as AJAX. the available solutions, Note that for search we usually want only to adapt the admin site: 1. do not activate the capthca on the admin. 2. change the cookieless attribute in the sessionState for the BotDetect to false, like explained here: more on cookieless:

Sharepoint 2013 search error: The crawler could not communicate with the server

wherever you get this error message in sharepoint 2013 search: The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly. the 1st thing that means is that the crawler just failed to get the page. but before you're running to the IIS and FW, you should just think about Permission. and that 1st of all means that everything is Published! Steps: 1. publish everything, incuding Master pages, Page Layouts, ect. 2. make sure the user running the search crawler has Read Permissions to that web. 3. if not the above, do check the IT stuff like communications and FW.

SOAP returns NULL response

many times its just validating the soap response ui

Whiteboart search and MVC tutorial screenshots

thats just for future tutoring. they're HUGE, cause they are for download or fullscreen.

Sharepoint Powershell Force Deploy

Add-SPSolution -LiteralPath [wsp path] Install-SPSolution [wsp filename(.wsp)] -GACDeployment -WebApplication [url (http://mysite)] -CompatibilityLevel All -Force -Verbose

Disable loopback check via Registry

specify the host names that are mapped to the loopback address and can connect to Web sites on your computer --------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------   a.  Start,  Run, regedit, and then click OK .   b.In Registry Editor, locate and then click the following registry key :      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0   c.  Right-click MSV1_0, point to New, and then click Multi-String Value .   d. Type BackConnectionHostNames, and then press ENTER .   e.  Right-click BackConnectionHostNames, and then click Modify .   f.In the Value data box, type the host name or the host names for the sites that are on the local computer (Ipost, IPostAdmin), and then click OK .     Quit Registry Editor, and then restart the IISAdmin service . you can also disable loopback

Sharepoint Application Errors do not appear on ULS logs

make sure your sp_webapp user is in the application pool under group " performance log users " (the user running the app). you may need to config the errors on the Central Admin again.