Search code examples
dynamics-crmcalculated-field

Calculated Fields based on status remove value after changing status


I have created a calculated field, it’s value fills as status change to something in particular.

It works fine, but when status change again, the value got removed.

I checked the condition of calculated field, it is good enough.

I want to complete the condition with something like no action in else. ( so when status change my satisfied value will not remove )

I tried this -> In else action : if status does not meet the condition if; try to assign the same value, but it does not allow.

I also tried to leave the else action with no action but it does not allow me.

What can I do for that?

The problem is that when status change, the value also remove. What can I do about this?


Solution

  • I afraid you cannot achieve your desired behavior using calculated field. As you may know, the calculation happens in real-time and the value is not stored in DB, you cannot keep some default or previous value as you want.

    For this, you need a physical value storing DB field and some way to capture the most recent desired value, and when you decide to skip the calculation logic - you can skip resetting in WF/plugin/script code logic.