Posts

Showing posts with the label SharePoint Online Development

How to migrate SharePoint Online SPWeb with custom SPList form (PowerApps) and Flows

Image
Problem I need to migrate a SPWeb with custom SPList form (PowerApps) within the same SPSite collection. Solution Run the following PnP PowerShell command from Windows PowerShell ISE $TemplateFilePath = "C:\temp\ PnPSiteTemplate_ YourSourceFormSubsiteName .xml " $SourceSiteConnection = Connect-PnPOnline https:// YourTenancy .sharepoint.com/sites/ SharePointForms/PROD/YourSourceFormSubsiteName -Interactive Get-PnPSiteTemplate -Connection $SourceSiteConnection -PersistBrandingFiles -IncludeAllPages -Verbose -Out $TemplateFilePath $TargetSiteConnection = Connect-PnPOnline https:// YourTenancy .sharepoint.com/sites/ SharePointForms/PROD/YourTargetFormSubsiteName -Interactive Invoke-PnPSiteTemplate -Connection $TargetSiteConnection -Path $TemplateFilePath -ClearNavigation Disconnect-PnPOnline Ensure the target copied list is unmodified. Do not rename it or change it until the PowerApps are imported and republished to prevent Data Source confusion after import. Navigate to List s...

SharePoint Online as Data Store for Power Apps

Problem I need to design data store for a PowerApp on multiple environments (i.e. DEV/UAT/PROD) using a single SharePoint Online production tenancy. Solution 1. Use a single-site (one environment per SPList) Pro: P1.1. SPList can be copied to another environment via browser UI. P1.2. Site-column internal name (SPList JSON schema) is consistent across all environment. P1.3. Site content-type cascaded update via browser UI will allow refreshing SPList content-type in all environments if required. P1.4. Adding new site-column can be implemented via browser UI. P1.5. Document Library schema can be copied via browser UI leveraging site-content type. P1.6. All environments permissions are managed via Site-Groups within a single-site. Cons: C1.1. Changing existing site-column can accidentally change all environments. C1.2. Changing existing site content-type can accidentally change all environments. C1.3. Site-administrator (Full Control) must ensure lookup site-column is not shared across en...

PowerAutomate Flow: Change SPListItem Author without increasing version number

Image
Problem I need to change the Created By (Author) of list item without increasing version number via PowerAutomate Flow but unfortunately there's no predefined action that is ready for use. Solution Use list API via Send an HTTP request to SharePoint action as follows. Note: to prevent new version of list item from being created, set "bNewDocumentUpdate":true   {      "inputs" : {          "host" : {              "connection" : {                  "name" :  "@parameters('$connections')['shared_sharepointonline']['connectionId']"             }         },          "method" :  "post" ,        ...

How to setup SharePoint Online Development Environment (Part 2)

Image
Following Part 1 article on setting up development workstation on Windows, this Part 2 article is for setting up the App Catalog and a Dev site on SharePoint Online, package the webpart, and install the webpart onto the site and page as follows: If you have not setup App Catalog, use the following steps to create an App Catalog site:   Navigate to https:// YourTenantPrefix -admin.sharepoint.com/_layouts/15/online/ManageAppCatalog.aspx       then select OK   Complete the followings as per your preference then select  OK       Create a development site collection:   Navigate to https:// YourTenantPrefix -admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/siteManagement/view/ALL%20SITES    then select +Create   Select Communication site     Select Blank and complete the followings then select Finish     Package solution for deployment to App Catalog site:   Type the following command o...

How to setup SharePoint Online Development Environment (Part 1)

Image
Problem I need to develop SPFx web-part for SharePoint Online which require new development environment to be setup on my Windows 10 workstation.  Solution Refer to the steps on https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment or use the following summarised steps: Download and install the required (refer to the above link) version of NodeJS installer (i.e. on 24 Feb 2023 it was node-v16.19.1-x64 for Windows 64 bit) which can be downloaded from  https://nodejs.org/dist/latest-v16.x     Run Windows PowerShell or Command prompt and execute the following command to install all prerequisites   npm install gulp-cli yo @microsoft/generator-sharepoint --global and command to allow execution policy (for more info, read  Set-ExecutionPolicy documentation ): Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Tips: use the following command to check latest version of generator-sharepoint and generato...