Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- General Development
- :
- Re: Opportunity Formula Calculation
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Opportunit y Formula Calculatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-18-2013 12:42 PM
We would like to have a final estimate field by a total hours field which is different for each opportunity in order to input into the hourly rate field (weighted hourly rate calculation). Example $65,500 "final estimate" / 1,230 "total hours" = "$53.25 weighted hourly rate" we would like this field to auto populate once the input values have been inserted and make the input value fields mandatory should either one receive data. We would also like to have the field automatically update should one or both of the input values be changed and saved.
Thanks,
Carla
916-375-6700
Re: Opportunit y Formula Calculatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-18-2013 05:29 PM
This is a toughie.... Ordinarily, people would just use a formula field to display the ""final estimate" / 1,230 "total hours" = "$53.25 weighted hourly rate" calculation.... but I assume you want this while in edit mode.
The only way I can think of is to have a "Compute final estimate" button", that displays a Apex page Modal popup that enters your data, and you use javascript to compute your weighted hourly rate. I wish I had a better idea, but that's pretty much how I see it.
You also have to have the popup re-display the opportunity page, which will cause an annoying flicker.
http://www.salesforcegeneral.com/salesforce-modal-
Re: Opportunit y Formula Calculatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-21-2013 03:22 AM
If you decide to use a VF page for data entry, you can put an <apex:actionSupport event="onchange" ...> on the input field, then have controller method that does your calculations and updates the screen. No flicker involved.

