Posts

Power Apps - Make Custom Functions

Image
Recently I've inherited a bunch of Power Apps which are showing their age. They've had a number of add-ons where other developers have tried to tweak/bolt on new functionality. You could argue that some of them have got to a stage where they could do with being started from the ground up, but then the cost/benefits usually out weigh the advantage of that. If I could give any piece of advice with Power Apps - heck any form of dev work, don't copy and paste your code. If you are repeating something, then that to me is a waste of time, that's what Functions/Methods are for. In Power Apps the problem is compounded... say the customer wants to change how some validation works on a form component or the app sends a series of emails out with different templates, you could end up hunting through heaps of controls looking for it. Only this week I came across needing to change some validation, the OnChange event had been modified for every control on the form all with the exact s

SPFx Christmas Banner Treat

Image
Fancy a Christmas Banner across your SharePoint sites - of course you do. Download my SPFx Solution which takes a "banner.png" from your root site collection Site Assets library (e.g. https://marnotechnologycom.sharepoint.com/SiteAssets/banner.png) and displays a wonderful Christmas treat. Update the uploaded items Title field to the height you would like e.g. "48px" (without quotes) The possibilities are endless... note that the sppkg file is built as an application customiser extension. Fancy something classier: Enjoy and have a wonderful Christmas break. (Make sure you test it first before rolling it into production... 🤣 ) Here's a link  to the Christmas tree image to get you started If you want to know how to code your own, follow the guide in  https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions This also makes use of pnpjs to get the height attribute from the title field so you'll need to

Power Automate - Update SharePoint item metadata using only variables

Image
 When you use the inbuilt Power Automate SharePoint "Update item" or "Update file properties" and want to use a variable for that, you lose all the prepopulated columns: For general quick Power Automates - "Update item" is fine, but if you work with other developers or promote these across Power Platform Environments and hook them up to different lists/libraries, you may want to be able to quickly set that information at the top of the Automate. Not have to scroll through tens/hundreds of steps to change the target list URL everywhere. This is where "Send an HTTP Request to SharePoint" comes in, you just have to know how to use the SharePoint REST API, or follow my guide below. My Target library has two additional metadata columns which I'll show you how to update, "Document Type" and "Item Types", the latter being a choice field. For the example below I show what this might look if you are passing an Id of an item from a

Use Power Automate to create a Document Set – The easy way!

Image
I’ve recently been working with improving some workflows which use Document Sets and stumbled into a problem. Online when you search for “Document Sets using Power Automate” you get posts such as:  https://karinebosch.wordpress.com/2018/11/08/microsoft-flow-create-a-document-set/ https://knowhere365.space/microsoft-flow-sharepoint-document-set-creation/ Now these posts have helped a lot of people but there is one drawback to them and most of the others I can find online. They rely on the use of _vti_bin (sometimes referred to as SP 2010 REST API) If you don’t know much about the history of VTI go check this out: https://www.spjeff.com/2009/03/13/history-of-_vti_bin/ It’s pretty vintage now. The customer I’ve been working with has a handful of SharePoint 2010 workflows we discovered using the SharePoint Modernisation Scanner  and we know that these are due for deprecation any time soon. During updating the Document Set workflows and doing some testing, on my first try it broke, a com

Is the content type hub broken?

Image
I'm based in the UK and my current customer relies on the content type hub to provide their information management policies across SharePoint. It's not a new thing and the use of content type hub publishing has been with us since 2010. I've even worked with a colleague a few years ago to create an automated publisher for SharePoint Online, which authenticated against the SPO chub page and used scraping to press that 'Publish' button! Many customers rely on it, so why did Microsoft break it? As content types take time to publish to new site collections during creation I've often had to code a 'poller' to check if the content types are available, once that SharePoint timer job has done its thing the next phase of provisioning can continue, such as applying these to inbuilt document libraries to enforce an information management policy. This is very similar to my current customers provisioning tool. The only thing - these content types have stopped appearin

SPOMigration Retrying due to error -2130246326

Recently we've been investigating the use of the SharePoint Online Migration API. We noticed when deleting and recreated lists to re-migrate data we would re-run a migration using  ConvertTo-SPOMigrationTargetedPackage Set-SPOMigrationPackageAzureSource Submit-SPOMigrationJob  But the jobs would fail . With a not so handy error of: "SPOMigration Retrying due to error -2130246326" Another error code I've seen for the same problem, with the items already in SharePoint is -2146233079 After a lot of digging - if the items aren't cleared out of the site completely (first and second stage recycle bins) then they won't go back in .  Most likely down to duplicate items with the same GUIDs - duh! We've had to wait up to an hour after clearing the recycle bins out before we can re-migrate the data, so give it some time. Hope it helps!

App Launcher for SharePoint 2013

Image
Got a SharePoint 2013 environment but you need to demo 2016 look and feel? Seen the SharePoint 2016 app launcher and want it on 2013? Seen the Office 365 App Launcher and thought that would be great on my SharePoint 2013 environment? This one's for you... a SharePoint 2013 app launcher ! Get the download here Before you run the PowerShell script to install it you should probably read below The launcher can be run using the PowerShell included in the root folder use .\DeployAppLauncher.ps1 -url <SITE URL TO DEPLOY> Run this on a test site, if you are running it on a Publishing site you'll need to enable the "Wiki Home Page" site feature, this can then be deactivated if you don't want it enabled... It creates the "Site Assets" library where the launcher is deployed to. It relies on a custom masterpage, so it'll change this to the new one included. These are the additional lines in the masterpage (jquery, the l