Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

How to empty a field each month?

(0) ShareShare
ReportReport
Posted on by 47

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
    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
    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
    16,331 Moderator 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
    55,410 Moderator 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 > Customer Service

Featured topics

Product updates

Dynamics 365 release plans