Set-PnPPageTextPart and Set-PnPClientSideText don't working to update text on pages #822
Unanswered
WagnerJoseS
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I hope I'm sending this problem to the right place :)
I'm trying to change the texts in the text webparts and unfortunately it's not working for me or in Azure functions.
Connect-PnPOnline $siteURL -ClientId $clientId -ClientSecret $clientSecret
$newPage = Get-PnPClientSidePage "$pageTitle.aspx"
$textControls = $newPage.Controls | Where-Object {$_.Type.Name -eq "PageText"}
foreach ($textControl in $textControls){
Set-PnPPageTextPart -Page $newPage -InstanceId $textControl.InstanceId -Text "Any text"
}
The error that shows
Set-PnPPageTextPart : CSOM service exception
No linha:4 caractere:5
I also tried to use the command but it shows the following message
Set-PnPClientSideText -Page $newPage -InstanceId $textControl.InstanceId -Text "Any text"
AVISO: Please use 'Set-PnPPageTextPart'. The alias 'Set-PnPClientSideText' will be removed in the 1.5.0 release
Set-PnPClientSideText : CSOM service exception
No linha:3 caractere:5
How do I update the texts on a page?
[]
Wagner José
Beta Was this translation helpful? Give feedback.
All reactions