Skip to main content

Posts

Showing posts from 2015

User a service bus to connect to debug remove event receivers.

I was trying to follow Kirk Evans blog http://blogs.msdn.com/b/kaevans/archive/2014/02/26/attaching-remote-event-receivers-to-lists-in-the-host-web.aspx on how to create and debug a remote event receiver. I get to the point where one uses a service bus, I created the service bus got the connection string. But I got this error @"Error 1         CorrelationId: e47f76f0-ea2f-4e47-a663-11551dce10aa         ErrorDetail: The remote event receiver callout failed.         ErrorType: Transient         ErrorTypeName: Intermittent         ExceptionMessage: There was no endpoint listening at [ServiceBus++Url]/AppEventReceiver.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.       ...

Deploy customized promoted link list

I needed to create a custom list based on the promoted link list. When I tried to add the list using Visual Studio I could not find a way to create a list template based on promoted links. I could only create list instances based on promoted links. That would have been ok if I did not need to add my own fields. Since I am using sand box solution and trying to make it non-code, I would have to find a declarative method to do this. I then tried to find the content type that promoted link is based on, but to my surprise, it is based a hidden content type called “System”. All the fields are defined in the list content type. Therefore, I could not create a custom content type based on any site content types. Then I got the idea of setting it up in a temporary team site and then export it as a template. Doing this would make so I could see how the exported WSP handled the promoted list. After importing the WSP into Visual Studio I was able to get a List Template for setting up the p...

The future of sandbox solution

Probably old news, but I was wondering what will replace SandBox solution. Because how else would we deploy stuff to SharePoint Online without WSP's, After some searching on the net I found this blog entry on SharePoint dev blog (link below). That states that the managed code part of SandBox solution is going to be removed, not the declarative parts like content types, lists, modules, etc, This will still be supported in what they call a no-code SandBox Solution (NCSS). I must say that it is nice to know that you can still use the ok part of the SandBox solutions, https://www.blogger.com/blogger.g?blogID=921264504943302831#overview/src=dashboard

Getting the script folder in PowerShell

Today I needed to call another script file in the same folder as the main script. After a little searching on the web I found "$MyInvocation.MyCommand.Path". "$MyInvocation.MyCommand.Path" returns the path to the current script, With that I was able to get the current folder using Get-Item. This is my test scripts: ToRun.ps1: Write-Host $MyInvocation.MyCommand.Path $scriptDirectory  = (Get-Item $MyInvocation.MyCommand.Path).DirectoryName $scriptName = "HelloWorld.ps1" Write-Host calling $scriptName in $scriptDirectory & ($scriptDirectory + '\' + $scriptName) HelloWorld.ps1: Write-Host "Hello word" After running the script the output was: calling HelloWorld.ps1 in C:\scriptFun Hello word Simple but useful.