Classes and interfaces

In this section, each class and interface of the concept will be explained in details.

Kipon.Xrm.Attributes.StepAttribute

The [Step] attribute allow you to decorate a method in a pluign as being a step. The recommended approach for mapping methods to plugin steps is using the naming convention, but if the naming convention for what ever reason does not apply to your patterns, you can decorate the methods with step


using Kipon.Xrm.Attributes;

namespace Kipon.PluginExample.Plugins.AttributeExamples
{
    public class StepExamplePlugin : Kipon.Xrm.BasePlugin
    {
        // declare step method my naming convention
        public void OnPreCreate(Entities.Account.INameChanged nameChanged)
        {
        }

        // declate step method by attribute decoration
        [Step(StepAttribute.StageEnum.Pre, StepAttribute.MessageEnum.Create, Entities.Account.EntityLogicalName)]
        public void OnNameChanged(Entities.Account.INameChanged nameChanged)
        {
        }
    }
}

Above example demonstrate the two ways you can declare plugin steps. The first by naming convention, the second using the [Step] decorator.

© Kipon ApS 2020, 2021, 2022, 2023, 2024. All content on the page is the property of Kipon ApS. Any republish or copy of this content is a violation. The content of this site is NOT open source, and cannot be copied, republished or used in any context without explcit permission from the owner.