Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Skipping business process flow initialization on related record creation with plugin

Posted on by 5

Hey there,

we have a BPF in place that starts from contact, which isn't needed at the creation of every contact, maybe never.

So I have been trying to use a plug-in to set the processID of said contact to guid.empty (   ) 

This is also refered to in the documentation here: Apply business process flow while creating an entity record.

I'm using the following code at the end. 

Its working as expected, and the processID is set to "0000..." after creation, nevertheless the BPFrecord is still linked and shown in the contact form.

This makes me think, that dynamics handles this differently now? Is there any info about changed behavior?

Could somebody point out a different way to skip the initialization of a BPF record on creation?

Thanks!

Julian

 

public class PreOperationContactCreate : IPlugin

    {
        public void Execute(IServiceProvider serviceProvider)
        {
            IPluginExecutionContext context = (IPluginExecutionContext)
            serviceProvider.GetService(typeof(IPluginExecutionContext));
            Entity target = (Entity)context.InputParameters["Target"];
            target["processid"] = Guid.Empty;
        }
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans