Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Workflow criteria is met but the email doesn't send out

  • 1.  Workflow criteria is met but the email doesn't send out

    SILVER CONTRIBUTOR
    Posted 3 days ago
    Edited by Jessica Howes 3 days ago
    Hi friends,

    I have a workflow that is meant to send an email notification when certain criteria is met. I can see from the process session that the criteria is being met so I do not understand why it doesn't complete the next step which is to send the email.

    The workflow is set to trigger when the record is Assigned and scope is Organisation.

    You can see from my process session that the trigger criteria gets met (little green tick). It just drops off and completes as successful after that without then sending the email notification.


    ------------------------------
    Jessica Howes
    Microsoft Dynamics Specialist
    Opus
    Reigate
    ------------------------------
    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 2.  RE: Workflow criteria is met but the email doesn't send out

    TOP CONTRIBUTOR
    Posted 3 days ago
    Jessica - are there steps after the email is sent?  I believe the the green check mark indicates the step was completed without error - not necessarily that the criteria in your check condition were met.  So, the check indicates it completed your step of checking criteria and it is moving on to the next step.  If it was meeting the criteria of your check condition, there would either been a green check next to the email step or a red x indicating there was a problem with sending the email.

    ------------------------------
    Jill Vazquez
    Technical Specialist - CRM
    Bioventus, LLC
    Durham NC
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 3.  RE: Workflow criteria is met but the email doesn't send out

    SILVER CONTRIBUTOR
    Posted 3 days ago
    Edited by Jessica Howes 3 days ago
    Hey Jill,

    No steps after. Please see workflow copied below.

    It completes the check as indicated by the tick but does not send the email.


    ------------------------------
    Jessica Howes
    Microsoft Dynamics Specialist
    Opus
    Reigate
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 4.  RE: Workflow criteria is met but the email doesn't send out

    TOP CONTRIBUTOR
    Posted 3 days ago
    so it would appear that your check condition is not being met for some reason...and that can be difficult to pin down when you've been focused on it for too long!  take a look at the regarding record on a succeeded process and really examine the details of the record - including clicking through to the lookup record you have in the condition compared to your check condition - there must be something that is different from your check condition in those records.  Also, examine your check condition to ensure it really states what you mean it to.

    To me, the check condition says to check the company record that was just assigned (an we know the trigger is working because the workflow fired).  Look at that company record that was just assigned and look at the related record shown in the lookup field called "Accounts Link" - in that related record, check to see if the "Package" field = X and the "Status" field = active.

    So, if you go to the Company record that had a successful workflow run, click on the "Accounts Link" to navigate to the related record, you should find that either the status is not active or the package is not X.

    What type of field is the "package" field?  if it happens to be a text string, try the contains operator instead of equals

    ------------------------------
    Jill Vazquez
    Technical Specialist - CRM
    Bioventus, LLC
    Durham NC
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 5.  RE: Workflow criteria is met but the email doesn't send out

    SILVER CONTRIBUTOR
    Posted 3 days ago
    There is a related Accounts Link record which meets that criteria. However, there is another one that does not.
    So I wander if the issue is because there are more than 1 Accounts Links records it is getting confused? I think I've had this problem trying to use the relationship between them before. It's all coming back to me.

    ------------------------------
    Jessica Howes
    Microsoft Dynamics Specialist
    Opus
    Reigate
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 6.  RE: Workflow criteria is met but the email doesn't send out

    Posted 3 days ago
    Jessica - One thing that I've done to help with this kind of troubleshooting is to add a default action clause whenever I have a conditional statement.  It makes debugging a lot easier to see when it somehow skips the conditional that I expected it to pass.  I usually just add a "Stop Workflow" element under the default action.

    Another option is to break out your conditions into a series of nested conditions for debugging.  That way you can see what condition is failing and you can make adjustments.


    ------------------------------
    Jonathan Blackham
    Sales Operations Specialist
    Valin Corporation
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 7.  RE: Workflow criteria is met but the email doesn't send out

    TOP CONTRIBUTOR
    Posted 3 days ago
    Jessica -

    The out of the box workflow functionality can't update records in a 1 to many relationship.  Do you have 2 fields or 2 different places where you can select that account link?  I'm guessing you have a spot where you can select one account link and then a spot where you can select multiple?  Or there is a lookup field where you can only select one account link that you are not actually using on the form.  That field where you can only select one account is the one that would be used for with the workflow - the workflow wouldn't be able to update a spot where you can select multiple links.

    the other thing you might be describing is if you have more than one field named accounts link where you can only select one record in each field - if that is the case, you would just need to add additional check conditions to check each of the fields separately.

    ------------------------------
    Jill Vazquez
    Technical Specialist - CRM
    Bioventus, LLC
    Durham NC
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 8.  RE: Workflow criteria is met but the email doesn't send out

    SILVER CONTRIBUTOR
    Posted yesterday
    Edited by Jessica Howes yesterday
    Hi Jill,

    The Company record can have multiple Accounts Link records. This is the Sub Grid of the Accounts Link records from the Company page.
    And the associated records view

    I do not want the workflow to update any records. It should read that one of them meets the criteria and then send an email notification.


    ------------------------------
    Jessica Howes
    Microsoft Dynamics Specialist
    Opus
    Reigate
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 9.  RE: Workflow criteria is met but the email doesn't send out

    TOP CONTRIBUTOR
    Posted 22 hours ago
    Jessica -

    Thanks for the clarification.  While you can use criteria in a 1:N relationship in advanced find to limit your search results, you can't in a workflow.  I just tested creating a workflow with a custom entity that has a sub grid of related records (1:N relationship).  I know this entity only has that one relationship with my sub entity.  When I attempt to build a check condition to look at record in the sub entity, the sub entity is not available in the list of related records.

    This tells me that you likely have more than one relationship with the entity used for your account Links sub grid and the other relationship is a N:1 or 1:1 and that relationship is what you are pulling into your workflow.

    So, in order to accomplish what you need, consider if you can create the workflow from that sub entity...which might be difficult if your trigger comes from the parent record.  Or, I think you could use AIden Kaskela's Workflow Elements which you can get free from AppSource
    https://appsource.microsoft.com/en-us/product/dynamics-365/kaskelasolutions.8e2a0463-dde5-4869-bf39-5efc945ffdbb

    ------------------------------
    Jill Vazquez
    Technical Specialist - CRM
    Bioventus, LLC
    Durham NC
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 10.  RE: Workflow criteria is met but the email doesn't send out

    SILVER CONTRIBUTOR
    Posted 22 hours ago
    This might seem a bit convoluted, but I think you can accomplish this by:
    1. Add a rollup field to your main entity that counts the number of AccountsLinkLookup records you have with a Package equal to XXXX and a Status of Active
    2. Change your workflow to send an email when this number is > 0 (the trigger would remain the same)

    If you do it this way, it will handle the one to many relationship because it's not actually trying to pick up one of those records - just looking at a summary of it on the main record.

    ------------------------------
    Terry Letkeman
    Bespoke Technology Services
    Winnipeg
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 11.  RE: Workflow criteria is met but the email doesn't send out

    TOP CONTRIBUTOR
    Posted 21 hours ago
    @Terry Letkeman that's an awesome idea!! ​

    ------------------------------
    Jill Vazquez
    Technical Specialist - CRM
    Bioventus, LLC
    Durham NC
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 12.  RE: Workflow criteria is met but the email doesn't send out

    SILVER CONTRIBUTOR
    Posted 21 hours ago
    Edited by Jessica Howes 21 hours ago
    @Jill Vazquez thank you very much for your time looking at this. My initial idea to fix it was to start the workflow the other way around, so from the Accounts Links not the Company but unfortunately the trigger is an action from the Company record!
    I may have to explore the Workflow Elements tool.

    @Jonathan Blackham thank you for your suggestion I will look to use that in debugging in other workflows.

    @Terry Letkeman, I agree with Jill that is a brilliant idea. Only problem is we are already maxed out on our 10 rollups on the Company entity that the Account Links records are attached to! ​​​


    Might there be something I could do to set a flag on the Company record and use that instead? If I create a new field for AM owner changed

    If Company Owner changes and related Accounts Link field Package = x and Status = active then update AM owner changed to = yes.
    Save workflow step
    Next step: if AM owner changed contains 'yes' send email notification
    Clear AM owner changed field

    I'm thinking that might need to be 2 separate workflows? I think that might do the ticket though... *fingers crossed*

    ------------------------------
    Jessica Howes
    Microsoft Dynamics Specialist
    Opus
    Reigate
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 13.  RE: Workflow criteria is met but the email doesn't send out

    SILVER CONTRIBUTOR
    Posted 21 hours ago
    Before rollup fields existed, we had a way of creating our own...
    1. Create a number field on your main entity
    2. Whenever a sub-entity field attaches itself with the correct criteria, increment the number field by 1 through a workflow

    This accomplishes the same thing as the rollup field, but doesn't use up one of your rollup fields - just a number field.

    ------------------------------
    Terry Letkeman
    Bespoke Technology Services
    Winnipeg
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 14.  RE: Workflow criteria is met but the email doesn't send out

    Posted 20 hours ago
    Jessica,

    The desired outcome is still a bit fuzzy for me since the entity names are interchangeable on my instance, but I think you could build this logic through a flow in Power Automate.  For it to be automated, you would need a trigger field, like the one that Terry mentioned above, but you could also do it on a schedule (a bit harder) or manually.

    A flow can list all of the related records that have a particular record in that relationship.  You can evaluate how many related records meet your criteria, and then you can trigger your email as appropriate.

    ------------------------------
    Jonathan Blackham
    Sales Operations Specialist
    Valin Corporation
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


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