Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Custom Actions removal error in Branding.CustomCSSWeb sample #16

@SRennocks

Description

@SRennocks

There is an issue with the foreach loop to remove the custom actions in PnP / Samples / Branding.CustomCSS / Branding.CustomCSSWeb / Pages / Default.aspx.cs , one lines 93 and 131.

This code works, which similar to the code in the Branding.UIElementPersonalizationWeb sample.

                var actions = existingActions.ToArray();
                foreach (var action in actions)
                {
                    if (action.Name.Equals(actionName, StringComparison.InvariantCultureIgnoreCase))
                    {
                        action.DeleteObject();
                        clientContext.ExecuteQuery();
                    }
                }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions