0

I have an object, let's call it Object2. Object2 has a field called Account which is a lookup. Account has a field called customer type. Object2 has a formula field which gets populated by Account.Customer_type.

There is a field update that concatenates a few values, including the formula field (Account.Customer_type).

In a report the field update is one of the columns.

Now the issue: if someone updates the customer type on the account, the report still shows the old value.

So I think formula change doesn't trigger the field update. What are the choices to fix this issue?

closed as off-topic by Sebastian Kessel, Pranay Jaiswal, Reshma, battery.cord, Lukas Lunow Mar 19 at 13:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – Sebastian Kessel, Pranay Jaiswal, Reshma, battery.cord, Lukas Lunow
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Could you be more specific about the sequence of operations when you say "the report still shows the old value"? When you say "field update", are you using Workflow Rules or Process Builder? It's hard to see what the issue is right now. – David Reed Mar 18 at 23:32
  • 3
    Formulas are only evaluated upon record retrieval so no DML occurs when the formula is evaluated and hence a WFR will not trigger and ensuing field update will not execute – cropredy Mar 19 at 0:28
  • @DavidReed field update I am referring to this concept: micropyramid.com/blog/field-update-workflow-in-salesforce – apadana Mar 19 at 1:10
1

The report is a red herring here - it has nothing to do with the problem.

Given that you have on Object 2 a field Customer_Type__c that is a formula reference to a field on another object (the Account), and you wish to construct another field on Object 2 that concatenates Customer_Type__c with other fields, you can't use Workflow Rules. As cropredy noted in a comment, formula fields have no underlying storage and "changes" to their values are not triggerable events.

If you can construct this other field as another formula field, that should be workable. Otherwise, you'll need to write a Process or Apex Trigger on the Account to propagate changes to its field downwards to its child Object 2 records.

  • I tried to write the other one as formula but it has a Long Text Area giving me this error: You referenced an unsupported field type called "Long Text Area" using the following field – apadana Mar 19 at 19:28

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