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 :
Finance | Project Operations, Human Resources, ...
Answered

Is it possible to reset a date field ?

(0) ShareShare
ReportReport
Posted on by 411

Hello everyone ;),

One user has made an error , he changed the date of start and end time 

pastedimage1602174132553v2.png

I tried to delete it but when i save it , the date appears again :( 

pastedimage1602174172406v3.png

Cordially
 

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

    Hi Archetype,

    You can create a business rule to clear date value.

    Here are steps.

    1.Go settings > customizations > customize the system > entities > price List > business rule.

    Click New button to create a new business rule.

    pastedimage1602213150523v1.png

    2.set condition and actions.

    If you don’t want to affect other price list records, you can set condition with the name of the record that you want to modifiy.

    pastedimage1602220800262v1.png

    3.Save,Active and publish it.

    pastedimage1602213376117v6.png 

    pastedimage1602213361250v5.png

    4.Test.

    pastedimage1602213728867v7.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Archetype Profile Picture
    411 on at

    Hello, thanks you very much for your answer, it has been deleted on the form, but on the view the dates still appears : 

    pastedimage1602238991079v2.png

    and on the view : 

    pastedimage1602239049465v3.png

    Ps : my business rule : 

    pastedimage1602239134889v4.png

    Cordially

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Archetype,

    The business rule just executes when form on load, but it can automatically fill date fields with the previous value when save records.

    So the date value in database is previous value, and it show in the view.

    In general, Many ways can clear fields easily (Business rule, Javascript, workflow, flow). However, it’s hard to clear date fields through my test.

    (1) Business rule

    As previously tested, business rules cannot change the values on the view.

    (2) Javascript

    When I set following code to OnSave event, it clear fields successfully, but when save it, the date appears again.

    function clearValue(executionContext) 
    {
        var formContext = executionContext.getFormContext();
        formContext.getAttribute("begindate").setValue(null);
        formContext.getAttribute("enddate").setValue(null);
    }
    

    (3) Workflow

    You can’t update price Lists in workflow.

    pastedimage1602489291995v1.png

    So you can’t set Properties and choose "Clear" as Operator on the right side, just like following(other entity):

    pastedimage1602489306596v2.png

    (4) Flow

    It can just update date fields with other date and clear general fields, can’t clear date fields.

    So you can fill date with the value you want Instead of clearing values.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Archetype Profile Picture
    411 on at

    Thanks you very much ! :) 

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans