Decor

Assign PowerApp canvas form for a new item creation in SharePoint Online

Assign PowerApp canvas form for a new item creation in SharePoint Online

There are two types of PowerApps: Form and Canvas. Assign PowerApp canvas application to the form of a List or Library is possible! If you just modified the list item view form you will see a lot of limitations on available functionality. So, you might want to create a Canvas app instead. If you created the Canvas type PowerApp it will always be opened from the PowerApp site. What if you want your users to user that PowerApp when they click on the New Item or Edit buttons in the list from SharePoint Online?

Assign PowerApp Canvas forms new item creation in SharePoint

Use The PowerShell Script Provided Below

 

Pre-requisitions:- You need to have at least site collection admin permissions - Run PowerShell ISE with admin privileges on your local machine - Install pnp

Install Module SharePointPnPPowerShellOnline

 

The script itself is here


Connect-PnPOnline -url https://CONTOSO.sharepoint.com/sites/dev -UseWebLogin
$list = Get-PnPList "EUTX  Architecture Services"
write-host $list.Name
$contenttypes= Get-PnPContentType -List "EUTX  Architecture Services"
foreach($cc in $contenttypes)
 {   
    
    Write-Host $cc.Name
    If ($cc.Name -eq "Item"){
    $cc.EditFormUrl = "SitePages/ItemEditForm.aspx"
    $cc.NewFormUrl = "SitePages/ItemEditForm.aspx"
    $cc.Update($false)}
    
 }

# assuming list content type 0 == Item
# otherwise, you need to set this on the correct list content type
# no update child content types
# you may have to set $true if you have content types in your list

$context = Get-PnPContext
$context.ExecuteQuery()
Next post: What Are Problems That IT Service Companies Solve?