I’m finally back, this time for real!

My last technical post here was in 2019. Almost two years ago, I promised that I will be back. But still nothing, absolutely nothing.

It’s a bit regrettable that I neglected my blog or my work, which I had been building for several years with various more or less useful articles, during all this time.

But at some point, it was necessary to make a cut and give more emphasis to oneself and to things that truly make you happy and fulfill you. This means getting rid of things that have been holding you at a certain level for several years, as time in the world of programmers quckly passes.

So, I’m back, here now. As I enthusiastically conclude my programming story for SharePoint and its related products.

During all this time, in parallel, I joyfully explored newer and more modern technologies in the programming world offered by Microsoft with it’s rapidly growing versions of .NET Core frameworks. Here’s MAUI, Blazor, and .NET Core development in general. And this is just the beginning.

Talk to you soon, in the first technical article in a long time.

Cheers!
Gašper Rupnik

{End.}

Featured post

Long time nothing from me – there is a reason :-)

Hello everybody again! Yes, I am still alive event if I haven’t been here since 2019. 🙂

The reason?
New work position: Lead Developer
Company: Still same – Kompas Xnet d.o.o.
When: from 2019

As you can see, I took over the complete development area in that company. That means I don’t deal only with SharePoint & Office 365 development area as before but I entered completely into all these Microsoft .NET Core development areas:

  • ASP.NET MVC
  • Blazor
  • .NET MAUI
  • IoT

As you can imagine there was less time than before, so that’s the main reason why it was so dead here this time. 🙂

But that means that I have even more things to write about! Firstly, I will post some of my articles from Pika magazines which haven’t been published here. And then of course finally some fresh articles.

See you soon!

Cheers!
Gašper Rupnik

{End.}

Web/Site Templates in SharePoint Online Modern Pages? No problem.

Let’s imagine that we want to have site template with predefined design, sections, web parts on it, lists with additional fields, custom page settings etc. etc.

If you are familiar with SharePoint On-Prem versions there we have Site Definitions and Web Templates for stuff like this. But what can we do now in SharePoint Modern Sites times in a combination with SharePoint Online?

We have to learn something new – there we have Site Scripts and Site Designs for some specific common steps in creation process of our Web/Site Templates. What you could do with Site Scripts you could see on that link.
But scope of modifying with Site Scripts is a lil’bit small, so we have to take a look into alternatives.

In SharePoint world we have SharePoint PowerShell modules – so we could use PowerShell to modify our Modern Pages in SharePoint Online. But we want to make this happen automatically when new Web/Site was created -> so we want to make this happen with Web/Site Template.
That is possible only with Site Scripts and Site Designs. Fortunately we could connect our PowerShell scripts with Site Scripts and Site Designs via Microsoft Flow, which could call Azure Function App which contains PowerShell script.

But PnP team go further with PnP Provisioning Engine in their PnP PowerShell modules where you could easly specify Web/Site Template in one XML file and put it into your PowerShell script which is called from Site Scripts via Flow.

Let’s take a look into a simple example.

Continue reading “Web/Site Templates in SharePoint Online Modern Pages? No problem.”

Anonymous CreateTerm leads to UnauthorizedAccessException and ArgumentNullException

Today is time for new post, new hack inside of SharePoint environment 🙂

Let’s imagine that we want to create new Term inside of specific Term Set within specific Term Store. But we want to create it as anonymous user, because we want to make this functionality available inside of some public page without login needs.

We could make this possible with code which runs inside of RunWithElevatedPrivileges scope. But creating term process differs from other creating processes inside of SharePoint (list item creation, file upload etc.).

Let’s take a look to this topic.

Continue reading “Anonymous CreateTerm leads to UnauthorizedAccessException and ArgumentNullException”

Working with Comments on SharePoint 2019 Modern Pages

With SharePoint 2019 we get new Modern Pages. With Modern Pages we get completely renewed Comments feature which looks like that example on image above.

On SharePoint 2019 you could currently use only Comments without Like and Views feature as on SharePoint Online (image below).

There is a new Comment REST API from where you could read / write comments for specific page and it is available on SharePoint 2019 and SharePoint Online. More about that you could read in that blog post from @vrdmn.

What I want to show you today is how you could programmatically read this comments from SharePoint SSOM.

Continue reading “Working with Comments on SharePoint 2019 Modern Pages”

Read user information from Skype for Business Online with Azure Function App

Let’s imagine that we want to create Address Book SPFx Web Part in which we want to have option to find and show details of our coworkers.

If you want to build it from scratch, you could choose TextField and DetailsList from Office Fabric UI. First for search box and second for showing results as you could see above.

But let’s take a look behind-scene – how we could search users from Azure AD and how could we get some of their additional information.

Continue reading “Read user information from Skype for Business Online with Azure Function App”

Import PowerShell Module / Package into your Azure Function App

If you have a concern about how you could use external PowerShell Modules or Packages inside of you Azure Function App written in PowerShell language then you could read this blog post where I want to show you my solution for that.

First of all you have to know that if you want to write Azure Function with PowerShell language support, then you have to use Function App with Runtime version 1.0 – so you couldn’t use latest runtime version 2.0 because there is no support for PowerShell language.

But why use PowerShell in Azure Function App? Let’s imagine scenario that we want to connect to Skype For Business Online API to which you could connect only from PowerShell.

But in that case we have to import specific PowerShell Module or Package into Function App in Azure.
You cannot simply call Import-Module SkypeOnlineConnector like on your local machine where you have previously installed SkypeOnlineConnector from that site. But you have to copy all files from that locally installed package into specific folder inside of your Function App in Azure.

So let’s take a look how you could do that.

Continue reading “Import PowerShell Module / Package into your Azure Function App”

XsltListViewWebParts with Paging problem or SaveChanges error

Let’s imagine, that we want to have SharePoint Library Template with more than 90 Views.

We want to define this views inside of List Schema.xml file because this is the easiest way for fast provisioning of SharePoint lists and their views. But there is the limit – List definition in Schema.xml file could contains max 90 views!

So we have to choose another way – we could define this views “by code”. We could make just few common views by Schema.xml and other could be copied from them with list.SaveAsNewView() function from SharePoint SSOM and then we could modify it by code.

After that we want to add this list views to some pages at SharePoint. Default views, made inside of Schema.xml could be added to page “by xml” with XsltListViewWebPart where we have to define BaseViewID for each view.

But views, created “by code” could be added into pages “by code” too. And here we could have problems with some SharePoint versions.

Continue reading “XsltListViewWebParts with Paging problem or SaveChanges error”

O365 SharePoint Suitenav: Add custom button

Today I want to show you, how you could add custom button to the right side of top Office 365 SharePoint SuiteNav / SuiteBar like in an image above.

For this suitenav we don’t have any official way in SharePoint 2016 like we have at SharePoint 2013 with SuiteLinks Delegate Controls.
Officially you could add only custom tiles on your App Launcher to the left side of SuiteNav named App Launcher Tiles – but only with SharePoint 2016 Feature Pack 1.

So we have to go in own way. I want to share with you how I have done this with JavaScript and a lil’bit hacking.
Just for information -> suitenav links are officially created with JavaScipt too.

Continue reading “O365 SharePoint Suitenav: Add custom button”

Website Powered by WordPress.com.

Up ↑