Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Creating a task on a contact's birthday

(0) ShareShare
ReportReport
Posted on by 803

We are wanting to create a task on a contact's birthday. Do you think a background workflow will work for this? The conditions will be if client's b-day field = current day, then create task. Will a background workflow slow down the system? Any thoughts will be appreciated.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Creating a task on a contact's birthday

    Hi,

    I would suggest to use Workflow Scheduler Solution by Alexander.  Its a solution which when installed, provides you with entity to schedule the workflow. This requires fetchxml to retrieve the records on which you need to run a workflow. So you can

    1) Create a workflow which run on demands on a contact record and creates a birthday reminder task.

    2) Fetch XMl query to retrieve contacts where birthday is today.

    3) And then configure a record in the entity to execute the fetch daily and run workflow.

    This is the easiest, no code solution to achieve this task.

    alexanderdevelopment.net/.../updated-solution-for-scheduling-recurring-dynamics-crm-workflows

    Hope this helps.

  • Suggested answer
    LeoAlt Profile Picture
    16,331 Moderator on at
    RE: Creating a task on a contact's birthday

    Hi Ben,

    I have tried workflow and found that we could not set "current day“ as a condition.

    comm18.PNG

    I recommend to use C# to achieve this requirement and you could refer to the following steps.

    1.Develop a Job(console) application to get the birthdays of all the contacts via WebApi and filter out the eligible people.

    Then create task with your logic requirement through WebApi.

    Here are some samples provided by Microsoft.

    Authenticate

    How to start a webapi via C#.

    Query Data.

    Create Record.

    2.Hang this application in a scheduled task and set to start running every 0:00 AM.

    comm18.PNG

    Hope it helps.

    Best Regards

    Leo

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: Creating a task on a contact's birthday

    Hi,

    I would avoid background workflow , because it will cause performance issue.

    1. Console application

    - create a task scheduler in your server, to run everyday.

    community.dynamics.com/.../simple-dynamics-crm-console-application

    docs.microsoft.com/.../task-scheduler-start-page

    2. MS Flow

    - If you have MS flow licence, you also can achieve it, by using scheduling MS flow.

    docs.microsoft.com/.../run-scheduled-tasks

  • Verified answer
    Mahadeo Matre Profile Picture
    17,021 on at
    RE: Creating a task on a contact's birthday

    HI...

    Yes, lot of waiting workflows will impact on system performance.. instead of waiting workflow you can do console application - which will run every day and create task on b-day, another option is SQL job (if on-premise)

    another option is workflow which is triggering based on record deletion or goal update and write logic in workflow to find out contacts who has  birthday today and create task.

    hope this will help..

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Dynamics 365 general forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans