Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Update calculated field value based on custom field value change

Posted on by Microsoft Employee

I have 2 fields in Invoice entity 

1) paid amount 

2) payment date(calculated field)

I want to update payment date field if the paid amount is modified. if there I can do it using calculated field? I don't want to use a workflow for this one field.

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Update calculated field value based on custom field value change

    Hi Gautam,

    My requirement is simple if paid amount field's value is modified then payment date field should be updated to the time of field updatation else payment date field should not update at all.

    I even tried with workflow. But I think for my requirement it will not work as I'm using an external Integration tool to update few fields in Invoice entity. hence the payment amount field gets updated changing the Payment date field too. I think I will have to handle the payment date field through Integration tool itself.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Update calculated field value based on custom field value change

    Hi Ankur,

    I am not aware deep level about your business logic but you may think in this way if I am not wrong.

    Let say you have two paid amount field -

    FieldA- After Current Amount ,

    FieldB- Before Update Payment Amount.

    You need to set FieldB using business rule when each update happen and Old amount will always set in field FieldB.

    So in your condition you can get both FieldA and FieldB. So you can understand the differences and you can implement your condition and  make calculate the payment date as per the FieldA bill amount.

    Hope this helps.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Update calculated field value based on custom field value change

    Hi Ankur ,

    I understand your point , but what I mean you could check the condition with modified on and then you can add days to your date or calculate your date .Just think opposite whatever you put in condition part and value will be prepare with predefined fixed value. Does it make sense for your business scenario.

    You can also think on business rules , you may be you can achieve the same.

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Update calculated field value based on custom field value change

    Hi Goutam,

    the issue here is I'm not sure how to determine if paid amount field is modified or not.6428.11.png

    I don't see any option to determine IsModified.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Update calculated field value based on custom field value change

    Hi Ankur ,

    My personal opinion you can do this without using workflow. You may need to introduce some additional flag field  to make the calculation done for example you want to add  30 days based on last modified date or you need to store last amount  bill. There are several method introduce in calculated field to handle basic date related operation.

    You can check below articles to make you more confident on this.

    ledgeviewpartners.com/.../using-calculated-fields-in-dynamics-crm-2015

    www.encorebusiness.com/.../dynamics-crm-calculated-fields

    Hope this helps you to implement your functionality.

    Best of luck Sir.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans