Is there a way to override stored calcs for testing?

#1

I’m trying to populate stored calc fields manually for testing but haven’t figured it out how to override the logic and just force insert them in the record.

I’ve tried upserting and using TestApi.createEntity()

0 Likes

#2

you cannot override them. What you can do is:

  1. make sure that you have enough data for the expression to return something,
  2. then call refreshCalcFields(spec)
0 Likes