Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

Create a custom workflow.

Posted on by 20
  1. Create a global optionset "MH Cities" to hold certain city names - Pune, Mumbai, Thane, Nagpur and Panvel.
  2. Create a boolean field "Outside Maharashtra" in contact entity and place it on the contact form.
  3. Develop a custom workflow to retrieve all contacts in the system and check if City field has a value equal to the one present in global optionset. If the value is one of those present in global optionset then set the flag "Outside Maharashtra" to yes else no.

 

For example there are 2 Contacts in the CRM, Arun has city Kolkata and Asmi has city Pune then Arun's flag should be set to - Yes and Asmi's - No.

 

Suggestion - you can develop your logic first in console application C# for easy debugging and then convert this to a custom workflow.

Categories:
  • Suggested answer
    Nya Profile Picture
    Nya 29,054 on at
    RE: Create a custom workflow.

    Hi, Shweta

    I’d like to suggest creating an On-demand Workflow and using the Bulk Workflow Execution Tool to achieve your needs.

    1. Create an On-demand Workflow.

    Set the condition. For the option set cannot be set as the condition, separate the options in the condition with semicolons in the following figure.

     1513.1_2D00_1.png

    1856.1_2D00_2.png

    1_2D00_3.png

    1. Create a view for the information you need.

     055715.png

    1. Install the Bulk Workflow Execution in XrmToolBox.

     1374.png

    1. Connect to the environment.

     1440.png

    1. Select the workflow and view.

     0882.png

    1. Click the ‘Validate Query’ in the top. The count of the records will be shown.

     10123.png

    1. Click the ‘Start Workflows’ in the top.

     6685.png

    1. Here is the result of the Workflow.

     8765.png

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Nya

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans