I'm trying to build a calculator of sorts in Salesforce. It's presently an Excel spreadsheet so there's nothing like super complex in it, but it seems I'm performing too many calculations to fit into a "formula" custom field.

I'm wondering if there's another way I can do it, like in Apex or Visualforce or whatever. I don't know enough about the platform to answer this question myself.

I need it to be on my Lead page, and it just has to perform some calculations based on what data the lead has (getting certain values based on ZIP codes, stuff like that). Any advice? Thanks!

1 Answer 1


How and where do you want to display the data?

You could use a trigger to actually do the calculations and form that it could update a field on the Lead record.

You could have a Visualforce Home Page Component that gets the current records details when it is a lead and does the calculation for you and displays it in the sidebar. (Something nicer, but like this)

You could also have a Visualforce page to the page layout to calculate what you need on page load and display it to the user.

It all depends on your needs... there are loads of ways!


You must log in to answer this question.

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