Saturday, January 5, 2008

CRM Calculated Fields

A client recently asked this question: Is there a way to create calculations between fields in Microsoft CRM?

Yes, this is possible using Javascript which is entered in the Customizations tab. Suppose your calculation for stock options expected is the number of employees plus the shares outstanding times 5 – the script below will illustrate how this calculation would work in MS 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 +
crmForm.all.sharesoutstanding.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.

8 comments:

Anonymous said...

Thanks, this was very helpful. :-)

CRM Services said...

CRM is a way of using technology to do just that. The idea of CRM is that it helps businesses use technology and human resources to gain insight into the behavior of customers and the value of those customers. Thanks for your posts.CRM Services

Anonymous said...

Hi
following the instructions I've reached my goal, however I need to make the calculated fields READ ONLY field, and when I change the proprierties the formula doesn't work no more.
can you help me please?
thanks in advance

sathish said...

Thanks for the sharing of such information.This is a great stuff of reading. I will pass it on to our audience. Thanking you,CRM Services

Ahmed Abdelghany said...

CRM Calculated field from equation
http://ahmed--abdelghany.blogspot.com/2012/03/crm-javascript-calculated-field-from.html

north52 said...

We have been using Dynamics CRM for several years and not having calculated fields was a pain to say the least. So to help us deliver our CRM projects faster we developed Formula Manager.

Its now an add-on application that has both a community & professional edition. So if you just need a couple of formulas then its free but if you use it heavily then we have a commercial offering.

http://www.north52.com/formulamanager.html


Hope this helps.

Zheng junxai5 said...


zhengjx20160623
cheap rolex watches
fitflops
timberland outlet
coach outlet online
toms wedges
true religion jeans
replica rolex watches
ralph lauren outlet
kate spade outlet
michael kors outlet
cheap jordan shoes
michael kors outlet clearance
coach outlet store online
fit flops
christian louboutin shoes
nike air huarache
coach outlet
timberlands
concords 11
ralph lauren home
toms wedges
retro jordans 13
burberry outlet
cheap jordans
gucci outlet
coach factory outlet online
abercrombie outlet
cheap air jordans
lebron 12
coach outlet online
tory burch boots
hollister clearance
cheap oakley sunglasses
nike free uk
louis vuitton outlet stores
louis vuitton outlet online
michael kors outlet
supra footwear
nike uk
michael kors outlet online

Hua Cai said...

true religion jeans
tiffany and co
gucci sunglasses
toms outlet store
coach outlet
ralph lauren outlet
michael kors outlet uk
nfl jerseys wholesale
ralph lauren outlet
michael kors bags
michael kors factory store
ralph lauren outlet
calvin klein underwear
ferragamo shoes
air max 90
juicy couture tracksuit
beats headphones
michael kors handbags outlet
nike foamposite
coach outlet
chaussure louboutin
michael kors canada
longchamp pas cher
chicago blackhawks
toms outlet
lebron shoes
nike roshe
ferragamo shoes
cheap ray ban sunglasses
lebron james shoes
tiffany outlet
christian louboutin outlet
coach outlet online
cheap jordan shoes
camisetas futbol baratas
20160716caihuali