In Account object I am having a formula field with address details and its related with other object (Lookup field), if any update happens means it should be reflected in account object based if the status is Active otherwise the previous value should be reflected.

Is it possible?


Formula field calculate value at runtime so it can't support your usecase but you can use following workaround

  1. Create another field text type.
  2. Fill that field using trigger.
  3. Refer that field in your formula field.
  • @Saroj Thanks for your response could you give me sample code for that. – Nikitha Sep 25 '15 at 6:53

Yes there is a function available called PRIORVALUE. But if you are creating formula field this won't give priorvalue for other fields.you can try to create workflow rule with criteria "created, and every time it’s edited", add a custom field on object and then update that field on the object. Here is a similar discussion thread you can go through.


yes, it can be done.

  1. Let's say current_field is the field, then you would have to create another field called old_field.
  2. Create a workflow rule to update the value in old_field. You will use update action and a FORMULA to return the PRIOVALUE(current_field). The reason why you will no use FORMULA Field is because PRIORVALUE Function is not available in Formula Fields.
  3. Now that you have both current and prior value, you could apply any logic on this.
  • This answer is more or less a duplicate of Himanshu's. – Adrian Larson Apr 4 '17 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.