Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

How to email all the related contacts present in SubGrid?

Posted on by 285

Hi, I have a workflow to send emails to all the contacts related to the store (custom entity) as soon as the lead is sold. 

So far, I created the subgrid to list all the related contacts on the Store Form.  Any suggestions??

Any help much appreciated.

  • nidnani Profile Picture
    nidnani 285 on at
    RE: How to email all the related contacts present in SubGrid?

    Thanks, again I went over the post and figured it out.

  • nidnani Profile Picture
    nidnani 285 on at
    RE: How to email all the related contacts present in SubGrid?

    Hi Aiden,

    It works flawlessly after adding the lead. Thank you so much. I wish I would have stated the lead part earlier - lesson learned. 

    Very happy to have you and Andrew in the community. Learning a lot from you guys!

    Thanks again!!

  • Verified answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,692 on at
    RE: How to email all the related contacts present in SubGrid?

    Hi ldz,

    If the workflow runs on the Lead entity, your query needs to somehow tie back to the lead so you end up with Lead Contains Data. If the lead is related to a store your query would be something like:

    - Look for contacts

    -- Related to a store

    --- Related to a lead

    --- Lead Contains Data

    Thanks,

     Aiden

  • nidnani Profile Picture
    nidnani 285 on at
    RE: How to email all the related contacts present in SubGrid?

    Andrew thanks a lot for calling out Aiden.

    Hey Aiden, really appreciate your time. I followed your instructions but still, Kaskela elements is adding all the contacts related to all the stores.

    I am adding all the steps below so we are on the same page and you can correct me if I am doing something wrong. 

    1. Query: 

    pastedimage1611111728391v2.png

    2. Workflow:

    pastedimage1611111873324v3.png
    pastedimage1611111902375v4.png
    3. Related Contacts: 
    pastedimage1611111955153v5.png

    4. Results: When an email is sent, three contacts are added instead of two. The other test contact is from a different Home Depot Store.
    pastedimage1611112612346v6.png

    Also, not sure if it affects, but the workflow runs on a Lead Entity. And these contacts are called based on the Lead's related Store. 

    Let me know if any other info required from my end. 

    Thank you in advance! 

  • Verified answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,692 on at
    RE: How to email all the related contacts present in SubGrid?

    Thanks for the ping Andrew. 

    ldz - you can include a query relative to some record as long as you can logically relate it back to the record your workflow is run on. 

    If your workflow runs on store and you want to include contacts, it would be:

    • Look for contacts
      • Related to a store
        • Store / Contains Data

    The last part is missing from your queries. It's the last step in this example:

    Now, if your workflow is triggered from a Contact (who is also related from the store) you'd need to do something like:

    • Look for contacts
      • Related to a store
        • Related to a contact
          • Contact / Contains Data

    The key here is that last field level filter applied to your query. Normally it's useless because it won't change your results, and that's why I picked it. Since nobody would actually use it, Workflow Elements looks for that criteria and it swaps in the ID of your workflow record. This is how it limits out the results to just the relative ones. 

    If you're testing your query in the Advanced Find while you're building it, instead of using "Contains Data" swap it out with "Equals / Home Depot". That'll give you the results as if you were running it on the Home Depot record. Just swap it back to Contains Data when you want it in the workflow.

    Can you give this a shot and let me know how it goes?

    Thanks,

      Aiden

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: How to email all the related contacts present in SubGrid?

    I can't add anything other than getting in touch with Tool's owner, Aiden Kaskela.

  • nidnani Profile Picture
    nidnani 285 on at
    RE: How to email all the related contacts present in SubGrid?

    Tried a bunch of stuff but still unable to get the specific related contacts. It adds up all the contacts related to all the other stores.

    Want to run on the specific one when the workflow is running.

  • nidnani Profile Picture
    nidnani 285 on at
    RE: How to email all the related contacts present in SubGrid?

    No luck. It is still adding all the other contacts related to different stores.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: How to email all the related contacts present in SubGrid?

    Add the filter underneath the linked entity that points to "Store" entity. It should be something like:

    
    
    
    
    
    
    
    
    
    
    
    
    

  • nidnani Profile Picture
    nidnani 285 on at
    RE: How to email all the related contacts present in SubGrid?

    Hi Andrew, there's no option of adding that filter without "Contains Data". As soon as a related entity is added, "contains data" pops up every time.

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans