Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

context.RegisterPluginStep("Create") not triggered by context.GetOrganizationService().Create #480

Closed
skfd opened this issue Feb 26, 2020 · 3 comments

Comments

@skfd
Copy link

skfd commented Feb 26, 2020

Hello!
I'm trying to test the context specifics of the plugin by simulation Create and Delete event for an entity. But my plugin step is not triggered.

var accountToDelete = new Entity(AccountDefinition.EntityName, Guid.NewGuid())
    {
        [AccountDefinition.Columns.Name] = "Deleted company"
    };
context.GetOrganizationService().Create(accountToDelete);
context.RegisterPluginStep<MyPlugin>(
    "Delete", ProcessingStepStage.Postoperation);
context.GetOrganizationService().Delete(
    accountToDelete.ToEntityReference().LogicalName, accountToDelete.ToEntityReference().Id);
@BetimBeja
Copy link
Contributor

Hello @skfd,
are you using Pipeline Simulation?

Best regards,
Betim.

@skfd
Copy link
Author

skfd commented Apr 13, 2023

I got stuck on #546 but looks like everything changed, so I'm closing

@skfd skfd closed this as completed Apr 13, 2023
@jordimontana82
Copy link
Owner

@skfd Yep,This should be working in v2/v3 versions, you can even combine it to automatically read plugin registration attributes now.

Feel free to give it a go there, here's a comprehensive new docs site , highly recommended the upgrading guide from v1.x.

https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/plugins/pipeline/

https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/plugins/pipeline/automatic-registration/

Highly recommended the migration guide in 6 steps on this link:

https://dynamicsvalue.github.io/fake-xrm-easy-docs/quickstart/migrating-from-1x/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants