Skip to main content

Notifications

Customer Service forum

How to empty a field each month?

Posted on by 45

I already tried creating a calculated field with a business rule that set today's date each minute, but a calculated field doesn't work with workflows, I create a business rule that compare the value with a date but doesn't work too.

The type of the field is a number.

Thanks

Categories:
  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
    RE: How to empty a field each month?

    Hi,

    Recurring workflow with wait time of month also an option.

  • Chakradhar Profile Picture
    Chakradhar 20 on at
    RE: How to empty a field each month?

    You can use Microsoft Flow.

    1. Create a new field called DateField (Date Time)

    2. You already have your NumberField

    3. Create a Flow which triggers on change of DateField

    4. Delay Until "DateField"

    5. Update NumberField to Null

    6. Create a workflow

    7. On update of NumberField --> if NumberField == Null --> Update DateField to Next month

    Let me know if you encounter any issues.

  • Suggested answer
    LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: How to empty a field each month?

    Good day partner,

    This requirement needs the instance check the data everyday, so you could refer to my thoughts.

    1. Create a console app in VS and connect to your D365 instance.

    2. Create a new field named "Month_Now" to store the currently month (like 1,2,3...).

    3. Using C# & Web Api(or fetchxml) to compare the currently month and the "Month_Now" value, if they are different, so empty the number field with webapi.

    4. Create a daily task in task scheduler and run the console app everyday so that the system will check the month continuously.

    About how to create console app connecting to D365, you could refer to the following blogs.

    https://www.magnifez.com/console-application-to-connect-to-dynamics-365-crm-9-x-version/

    https://arunpotti.wordpress.com/2018/02/03/step-by-step-to-connect-dynamics-365-crm-online-v9-x-using-c-console-application/

    About how to update the field, you could refer to this blog.

    https://carldesouza.com/dynamics-365-create-retrieve-update-delete-console-app/

    Hope it helps.

    Best Regards,

    Leo

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How to empty a field each month?

    Hi,

    You can create a workflow to be run as child workflow and implement a one month wait and then clear the value and then again call the same workflow. Basically scheduling a workflow with a timeout.

    www.axpulse.com/.../

    www.crmsoftwareblog.com/.../

    Hope this helps.

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans