Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Check existence of record before creating using Workflows

  • 1.  Check existence of record before creating using Workflows

    Posted Mar 07, 2019 04:00 PM
    I have a need to create new record using workflow. But before it creates, I need to check if doesn't exist already. So, basically workflow has to create a record only when there is no such record exists. How do I check this condition in OOB workflows. I know I can write a custom workflow. But need to check with community if there is a ready-made custom (managed or unmanaged) solution available to import and use.

    ------------------------------
    Vijayakumar Kenchugundu
    Microsoft Dynamics Applications Architect
    ARC (Airlines Reporting Corporation)
    Arlington VA
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Check existence of record before creating using Workflows

    Posted Mar 08, 2019 02:02 AM
    Have a look at North52, I expect you would be able to configure this to perform this feature, however its heavily dependent on what you consider 'existing', ie matching id field, multiple fields, already related to a specific record etc. without detail its a bit hard to say, so North52 is your best bet I think to see if you can get the desired result without a custom workflow action.

    Cheers

    ------------------------------
    James Abraham
    Practice Lead, Dynamics
    Empired
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Check existence of record before creating using Workflows

    TOP CONTRIBUTOR
    Posted Mar 08, 2019 03:04 AM
    I achieved something similar using the text to lookup feature in TCS Tools.
    It only really works if you enforce uniqueness on the names in the target entity.
    Stage 1 of the workflow attempts to populate the lookup field with a text string.
    Stage 2 of the workflow checks to see if the field in stage one is populated, and if not, creates a record with the text string.

    https://www.itaintboring.com/dynamics-crm/dynamics-crm-use-a-workflow-to-set-a-lookup/

    ------------------------------
    Donal McCarthy
    BrightWork
    Galway
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Check existence of record before creating using Workflows

    SILVER CONTRIBUTOR
    Posted Mar 08, 2019 07:21 AM
    My customers encounter this situation quite often and the best option for them is Kaskela's Workflow Elements. It's free and amazingly useful.

    Take a look at the "Get Results" function. You define a query, link it to the workflow step, and then you can use the number of results in a check condition to decide if the workflow continues running.

    Hope that helps,


    ------------------------------
    Mike Cutlip
    RAMCO
    www.RAMCOAMS.com
    Durham, NC
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: Check existence of record before creating using Workflows

    Posted Mar 08, 2019 10:20 AM
    ​Thank Mike. Kaskela's solution worked very well.

    ------------------------------
    Vijayakumar Kenchugundu
    Microsoft Dynamics Applications Architect
    ARC (Airlines Reporting Corporation)
    Arlington VA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: Check existence of record before creating using Workflows

    Posted 23 days ago
    Mike,

    Is this solution still working on Version 1710 (9.1.0.18353) online?  This seems like a viable solution for me for not having to write code.  However, I'm not seeing any output properties.

    ------------------------------
    Jeff Orris
    Jeffrey Steven Orris - Independent Consultant
    Harrisburg
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 7.  RE: Check existence of record before creating using Workflows

    SILVER CONTRIBUTOR
    Posted 23 days ago
    Edited by Mike Cutlip 23 days ago
    Hi Jeff, it should still work but I can't confirm as I'm only using 8.2 on-prem.

    The output check is done in a workflow Check Condition. For example, you'd have an action step in the workflow to call the Kaskela "Get Results" method. In the properties for that step you'd set the personal or system view to use. Then at a later step in your workflow you'd add a check condition. The conditional check itself, in the Form Assistant on the right, can look at the "Get Results" output. So you could do a check condition like "If Get Results equals 0", then add your logic branches based on that. It's a way easier setup than some of the output parameters I've seen in other workflow solutions.

    ------------------------------
    Mike Cutlip
    RAMCO
    www.RAMCOAMS.com
    Durham, NC
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role