Posts

Event Receiver

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/403c001b-b720-4b12-bb5c-6b95c9fbaf89/how-to-get-column-values-on-item-added-event-receiver?forum=sharepointdevelopmentprevious https://www.red-gate.com/simple-talk/dotnet/net-tools/managing-itemupdating-and-itemupdated-events-firing-twice-in-a-sharepoint-item-event-receiver/ https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ff521580(v%3Doffice.14) https://sharepoint.stackexchange.com/questions/216386/add-new-itemeventreceiver-methods-in-visual-studio-on-top-of-existing-event-rece https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/handle-list-item-events-in-the-provider-hosted-add-in using ( SPSite originalsite = new SPSite ( properties . SiteId , properties . OriginatingUserToken )) { //To get the current user using ( SPWeb web = originalsite . OpenWeb ()) { string strUserName = web . CurrentUser . LoginName . ToString (); } }

How to add webPart to Page with PowerShell from WebPart Gallery

https://sharepoint.stackexchange.com/questions/233319/how-to-add-webpart-to-page-with-powershell-from-webpart-gallery #ensure that you use the site collection root url #if you use subsite url, will throw error since webpart gallery #exists only in the site collection root site $web = Get - SPWeb "https://site-collection-url" $pubWeb = [ Microsoft . SharePoint . Publishing . PublishingWeb ]:: GetPublishingWeb ( $web ) $publishingPage = $pubWeb . GetPublishingPage ( "https://site-collection-url/Pages/Test.aspx" ); $publishingPage . CheckOut (); $list = $web . Lists [ "Web Part Gallery" ] #use the webpart title or the .webpart file name $wpl = $list . Items | where { $_ . Title - eq "Your Webpart Name" } $xmlReader = New - Object System . Xml . XmlTextReader ( $wpl . File . OpenBinaryStream ()); $errorMsg = "" $wpManager = $publishingPage . ListItem . File . GetLimitedWebPartManager ([ S

HTTP 404 Not Found Error with .woff or .woff2 Font Files

https://hotcakescommerce.zendesk.com/hc/en-us/articles/210926903-HTTP-404-Not-Found-Error-with-woff-or-woff2-Font-Files https://weblog.west-wind.com/posts/2016/jan/25/fontawesome-fonts-and-mime-types-in-iis-and-other-web-servers <system.webServer> < staticContent > < clientCache cacheControlCustom = " public " cacheControlMode = " UseMaxAge " cacheControlMaxAge = " 365.00:00:00 " /> < remove fileExtension = " .woff " /> < remove fileExtension = " .woff2 " /> < mimeMap fileExtension = " .woff " mimeType = " application/x-font-woff " /> < mimeMap fileExtension = " .woff2 " mimeType = " application/font-woff2 " /> </ staticContent > < modules >

copy one list item to another

#################################################################### #Copy/Replace items from one list to another list with Attachments #Original Author:Adi #Enhancements - Author: Indra Appala #################################################################### Remove-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue    try    {       $srcListSiteUrl = "http://win-4qnjgfbpcf3:2323/sites/test/"       $SourceListName = "Contacts 1000"       $dstListSiteUrl = "http://win-4qnjgfbpcf3:2323/sites/test/"       $DestinationListName = "Contact"       $keyColumnInternalName = "Title"       $sourceListWeb = Get-SPWeb -identity $srcListSiteUrl       $sourceListUrl = $sourceListWeb.ServerRelativeUrl + "/lists/" + $SourceListName;       $dstListWeb = Get-SPWeb -identity $dstListSiteUrl       $destinationListUrl = $dstListWeb.

Download Deployed Solutions (WSP) from Central Admin with PowerShell in SharePoint 2013

    $FolderPath = "c:\Solutions"     foreach ($solution in Get-SPSolution)     {        $id = $Solution.SolutionID        $title = $Solution.Name        $filename = $Solution.SolutionFile.Name        $solution.SolutionFile.SaveAs("$FolderPath\$filename")     } 

We apologize for any inconvenience, but we've made the site read only while we're making some improvements

$admin = new-object Microsoft.SharePoint.Administration.SPSiteAdministration ("http://192.168.10.50/") $admin.ClearMaintenanceMode()

Display Locations on a Map in SharePoint 2013

https://rajatvedisharepoint.blogspot.in/2018/01/display-locations-on-map-in-sharepoint.html?lipi=urn%3Ali%3Apage%3Ad_flagship3_feed%3Bay34%2BcEXQou8UPH0s0XhAQ%3D%3D