Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Duplicate detection via workflows

Posted on by

Hello,

We have a subgrid with connections on the account form and we have built a small workflow which creates a connection when the user fills in a checkbox. We would like that users make connections to accounts themselves and of course we wouldn't like to have duplicates. 

We have created a duplicate detection rule and if we create a connection manually it works as expected but the rule is not fired when the workflow creating a connection has been invoked. 

Are we missing a setting somewhere or is this some kind of limitation of the system (CRM Online 2015 U1)? From what we read on TechNet only the duplicate detection dialog is bypassed by the rule should be executed.

Cheers

Vassil

*This post is locked for comments

  • Vassil Profile Picture
    Vassil on at
    RE: Duplicate detection via workflows

    Hi Adam,

    The idea is that multiple people can make connections to different records so those can be visualized in dashboards. What I did is to write a duplicate detection plugin and everything works well except giving feedback to the user when a duplicate exists. If I let the plugin create an exception the whole process will be rolled back and we do additional actions. So we decided that for now we can live with no feedback to the user and good data in the system.

    Thanks for the help!

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Duplicate detection via workflows

    To Neil's point:

    You have a workflow so that when a user selects a check box, a Connection record gets created, with some pre-defined parameters.

    Add a second, hidden checkbox to the entity (but not to the form) to record when a user does this for themselves.

    If a user adds a Connection manually that is the same as the one the workflow would create (Can you test this by the connection roles that are chosen for example?), then select (tick) the new checkbox, then also select the checkbox the user sees on the form. That way they (or another user) will see this is checked and not try to select it again.

    The original workflow needs a condition to be inserted at the begining to test if the new check box is selected (ticked). If it is, do nothing.

    So, user creates Connection, check box gets selected, workflow fires, but stops because it sees the "user already did it" check box is filled in.

    You could also get the Workflow to select this new check box to show it has been run. That way if a user selects the check box on the form, then deselects it, then checks it again, you don't end up with two Connection records.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Duplicate detection via workflows

    Neil is correct - rules are not in consideration from workflow.  If you require this business logic it must be done with custom plugin.

  • Verified answer
    Neil Parkhurst Profile Picture
    Neil Parkhurst 10,725 User Group Leader on at
    RE: Duplicate detection via workflows

    I don't think you are missing something, a workflow will not trigger the duplicate checking dialog.

    I'd question (sorry) the concept of creating the connection from the workflow. If it works by users adding the connect manually, then maybe try to get them to use that approach.

    I assume doing the OOB manual approach will also allow you to define start / end dates for the connection, flex the role of the connection and enter optional descriptions when needed. Things (I guess) your workflow might not do from just a tick box.

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