You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clearly states:
"Site scripts can be run again on the same site after provisioning. Site scripts are non-destructive, so when they run again, they ensure that the site matches the configuration in the script.
For example, if the site already has a list with the same name that the site script is creating, the site script will only add missing fields to the existing list."
The Create List Step outputted:
ErrorCode : 0
Outcome : 0
OutcomeText :
Target : ########## (redacted)
TargetId : 92509bd0-1a58-4e7f-b20c-3af7e3ab6abe
Title : Create or update list "Contacts"
I notice that the step is specifically named "Create or Update list..."
The Output of the SiteScript Step for adding the additional field looks like this:
ErrorCode : 0
Outcome : 0
OutcomeText :
Target :
TargetId :
Title : Add list column "TESTAddColumn"
Notice that NO error was given, but also that the "Outcome" = 0.
Again, The Column was NOT created in the list
The text was updated successfully, but these errors were encountered:
So, in the last week, it would seem this has changed yet again,
When I run my script now, I get the output:
ErrorCode : -2130575342
Outcome : 2
OutcomeText : List with name Contacts already exists.
Target :
TargetId :
Title : Create or update list "Contacts"
And the Create Column steps are NOT even executed..
I provisioned a Site and Lists from a Site Script.
I then amended the Site Script to add another field to one of the lists.
I then ran the Invoke-PnPSiteScript again, expecting the new column to be created.
It was not.
The documentation here:
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
Clearly states:
"Site scripts can be run again on the same site after provisioning. Site scripts are non-destructive, so when they run again, they ensure that the site matches the configuration in the script.
For example, if the site already has a list with the same name that the site script is creating, the site script will only add missing fields to the existing list."
The Create List Step outputted:
ErrorCode : 0
Outcome : 0
OutcomeText :
Target : ########## (redacted)
TargetId : 92509bd0-1a58-4e7f-b20c-3af7e3ab6abe
Title : Create or update list "Contacts"
The Output of the SiteScript Step for adding the additional field looks like this:
ErrorCode : 0
Outcome : 0
OutcomeText :
Target :
TargetId :
Title : Add list column "TESTAddColumn"
Notice that NO error was given, but also that the "Outcome" = 0.
Again, The Column was NOT created in the list
The text was updated successfully, but these errors were encountered: