7

Any ideas why I would get a "Data Not Available" error when editing a custom field?

In this specific instance I'm editing a formula field, and I'm able to edit and save changes to the description and help text, but when I edit the formula I get a "Data Not Available" error.

I'd thought this might be a browser issue and cleared everything and retried, same result. What could cause this sort of thing?

In this specific case, I was changing the formula from

Field1__c - Field2__c

To

MAX(0, Field1__c - Field2__c)
7
  • Are you referencing any fields in your formula that the field level security is not set up correctly (not visible for the profile)? Commented Jun 17, 2014 at 0:17
  • What release is the Org on? Spring 14? Commented Jun 17, 2014 at 0:26
  • @DanielBallinger yes, spring '14 Commented Jun 17, 2014 at 17:19
  • @Bachovski updating the question with the example Commented Jun 17, 2014 at 17:19
  • @Ralph Are you missing a __c) at the end of that last formula? I'm assuming this is more a typo in the question than the reason for the Data Not Available error. Commented Jun 17, 2014 at 19:15

3 Answers 3

1

In general this sort of error can be caused from references to the formula field that might be invalidated by your change. The general solution is to:

  1. Try to delete the field to get a list of all references to it
  2. Remove those references temporarily
  3. Make your change
  4. Redo the references

Some potential reasons are (1) changing the formula will cause another formula (field, workflow rule criteria / workflow field update) to exceed the compile size limit, (2) formula is referenced in a rollup summary (alteration would require re-calculation which they probably haven't thought to support yet, (3) something else.

Some changes that shouldn't matter (1) code references, (2) references in other formula fields that don't lead to compiled formula size exceeded limits, (3) anything else salesforce has put the effort in to support.

If it's a compiled formula size issue there are some well known workarounds & remedies for that:

5
  • thanks for the tips, funny thing is it want let me "comment out" the formula, which i tried by changing it to just "1" Commented Jun 17, 2014 at 20:08
  • Crazy. You don't have unit tests or deployment running in the background or something like that? You might have to contact support... :/
    – eyescream
    Commented Jun 17, 2014 at 20:13
  • it's looking like that, next move is to refresh a sandbox and try deleting stuff per your suggestion to see if that can lead to some references that may be blocking this, that said, I was not under the impression that you can't edit formula field formulas for fields that have references to them. That's actually one reason I love formula fields, there kind of an abstraction barrier in the data model ... Commented Jun 17, 2014 at 20:17
  • Cheater, how I'm now supposed to upvote what essentially is your own thoroughly-investigated & nicely reworded answer :D
    – eyescream
    Commented Jun 17, 2014 at 22:49
  • Hahaha, figured I'd edit yours since it was 80% of what I was going to do as a separate answer :) Commented Jun 17, 2014 at 23:05
1

Are you using Cross-Object Formula field and associated record with other object is deleted. This can be the reason

1
  • I don't think so, but I'm not sure I'm following. Could you provide an example? E.g. obj1 has field1 and obj2 has a lookup to obj1 lookup and a formula field field2 with formula XXX Commented Jun 17, 2014 at 17:23
1

This is actually Working as designed. When the name of the referenced field is changed , the formula field has no clue to which field to refer to and hence results in 'Data not found Error'. The workaround will be to first remove any dependencies and then save the field.Edit it and change the name subsequently.

(or) Open a support case to have them run the below scrutiny to find Data Not Available errors on the recycle bin: ScrutinyOtherOrgAuditFields.User.LastModifiedBy scrutiny

2
  • I'm not sure i'm following exactly, could you clarify a bit? E.g. give some example objects and fields that illustrate the scenario where you'd get this error? Commented Jun 17, 2014 at 17:21
  • I think Varun talks about renaming of fields that are referenced in formulas, workflow rules etc... But for some time now the formulas editor got smarter and it seems to "cascade" nicely...
    – eyescream
    Commented Jun 17, 2014 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .