Posts

Showing posts with the label sharepiont

SharePoint Online/2019 javascript/spfx click/popstate not working

Image
Are you working with SharePoint 2019? Maybe making some SPFx Extensions?  popstate not working?  click not working?  MutationObserver not working?  well, take a look at this As you can see, Microsoft are intercepting every click in the page, while stopping any bubbling. Therefor, any window/document/body onclick event will not work, in case you are trying to globally catch it. Same for popstate or MutationObserver. *Note - on SPO it seems that popstate event works. Solution - make an interval to keep watching href change: let   xPrevLocation  =  location . href let   xOnLocationChangeFunctions  = [] setInterval (() => {      if  ( location . href  !=  xPrevLocation ){          console . log ( "interval location change" ,  xPrevLocation ,  location . href )          xPrevLocation  =  loca...

SharePoint Search move to another page with same Query and Filters

Image
NOTE: this is classic SP, meaning 2013, or classic experience in 365, classic sites, or in my case, Publishing Site Collection, even on O365 - SP Online.  Scenario: I have a search page, for our randomly designed search results, with filters and paging, so far so good, SP provides everything except the design, for that we play with our design templates. Now our darling customer asks us to make a dynamic page for our singe item result.  Usually either we build a page-based system, and the results are pages, or even with documents-based system, usually we click on the docs and open them. In our case we had documents, in a  Documents Library (where else?), with some columns, and when we click on a result we go to a customized page that projects the metadata (columns) to that page. Again, so if we get a result for a PDF or Image, we now open another .aspx page, there we show the Title and Thumbnail and Description and so on of the file, most of them just more fields in the Do...

sharepoint 2013 workflow copy list item to another site - FULL TUTORIAL

Image
This also works for SP2016, and most likely 2019. There are quite a few tutorials out there, but each missing a step, so this is going to be a full one top to bottom. I will make a rich tutorial with pictures, but lets review the steps, and how its done. Workflows doesn't have a way to copy list items to another site, so you need to make an HTTP Request for that, with the Rest API. Also Workflows can't build really JSON objects, so we will need to create Workflow Dictionaries. 1. Have a source list on site A, and a destination list on site B, and open SharePoint Designer 2013 on site A. 2. Learn and test Rest request for adding an item. 3. Build our Workflow, and lets not forget to make the Request as an "App Step" 4. Enable site feature for app step 5. Give the app permissions on site B 6. Run on Item Created (for the example) 7. Error Handling So lets go! 1. Have a source list on site A, and a destination list on site B, and open SharePoint Desig...

Sharepoint Rest Api

Working with the SP Rest Api i found some basics that are here to remember. get by title var u = "/sites/newportal/_api/Web/lists/getbytitle('Site Pages')/items" select person field u += "?$select=Title,Assigned_x0020_To0/Name,FileRef,FileDirRef" +          "&$expand=Assigned_x0020_To0" get folder var u = "/sites/newportal/_api/Web/GetFolderByServerRelativePath" +               "(decodedurl='/sites/newportal/SitePages/NewEmp')/Files?$select=*" but to really get a person data by folder in site pages i had to use search var u = "/_api/search/query?" +             "querytext='ParentLink:NewEmp'" +             "&selectproperties='Path,Title,AssignedTo0OWSUSER'"

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

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 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 Powershell Force Deploy

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