flybynight

Calculations - best practices?

Discussion created by flybynight on Jul 13, 2014
Latest reply on Feb 8, 2015 by CarlSchwarz

Just looking to gather some feedback from the seasoned devs out there. To calc or not to calc? To store or not to store? Indexing?

 

From some of the reading I have been doing, I get the impression that "calculation fields are the devil!" and should be avoided at all cost.

It seems to be an issue of convenience (plain old calc field) vs performance with dependency and other considerations with auto-enter calcs, scripted calc routines, etc. I prefer to handle most things in a way that isn't script or layout specific, although there are times when the workflow calls for that with script triggers, etc. I just don't want to create a situation where it can easily be forgotten to copy a script trigger to a different layout. I'd rather it be handled in schema. Seems more bullet proof to me, but correct me if I'm wrong, please!

 

Is it a matter of how big a database gets, for choosing your method? Or are calc fields to be avoided at all costs, no matter what? Do you only use auto-enter calcs? And why?

 

Just trying to learn from the pros and spread knowledge. If you have any other resources you would point me to (I'm sure this discussion has already happened numerous times), that works too. Or if you have a DevCon session that you would recommend I check out, I'll be there too. I would check out the "SHAKING THE DEPENDENCY TREE" session, but I have watched the video from last year, and that is one of those blocks with 4 or 5 sessions that look good to me, so I might do a different one.

 

Thanks!

-Shawn

Outcomes