A client recently asked this question: Is there a way to create calculations between fields in Microsoft CRM?
* Select Settings > Customizations > Customize Entities
* Select Account > Select the Main Application Form
* On the Details tab > Select Add Fields > Add Shares Outstanding
* Save and close the Form window > Select Attributes > Click New
* Create the results field > Name it "shareemp" > Select int field
* Save and close > Open the Main Application Form > Add Fields
* Add the shareemp field (called new_shareemp because it is custom)
* Change the label to Options Expected
* Save and Close > Select Actions > Publish
* Enter script in the No. of Employees and Shares Outstanding fields
var sum = crmForm.all.numberofemployees.DataValue +
var total = sum * 5;
crmForm.all.new_shareemp.DataValue = total;
Enter this script by double clicking on each field (from the main application form) and entering it under Events > OnChange. Make sure the Enabled checkbox is checked. Save and close and Publish the changes.
Now, whenever the number of employees or shares outstanding changes, the options expected will be recalculated on the Detail tab of the Account form.