web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How can I send email to all users having security role say 'Salesperson'?

(0) ShareShare
ReportReport
Posted on by 40

I want to send email to all the user who has salesperson role. How i am able to achieve it, is it possible sing workflow? or any development is required like plugin? 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi prabodh,

    yes, it is possible; you need to:

    1) Retrieve all user with the same role (here the fetch):

    <fetch mapping="logical" count="50" version="1.0">
      <entity name="systemuser">
        <attribute name="systemuserid" />
        <link-entity name="systemuserroles" from="systemuserid" to="systemuserid">
          <link-entity name="role" from="roleid" to="roleid">
            <filter>
              <condition attribute="name" operator="eq" value="salesperson" />
            </filter>
          </link-entity>
        </link-entity>
      </entity>
    </fetch>

    2) Then, foreach user retrieved, execute the following code:

    https://msdn.microsoft.com/it-it/library/gg334461.aspx 

    Please, let me know if you solve.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Suggested answer
    levindi Profile Picture
    35 on at

    Hello Prabodh,

    1. You can create a custom workflow on user entity with your email details and set the "To" to dynamic value of the user.

    The trigger for the workflow should be - on demand

    2. Then, run advanced find and look for all the users with the security "salesperson".

    3. Choose them all, and run the workflow from the advanced find ribbon.

    *You will have a limitation for the max number you can send at one time - becuase the max number of records that can be shown in a single page of view / advanced find is 250

    Good luck

  • Community Member Profile Picture
    on at

    Hi prabodh,

    if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans