Summary:

I require to make basic calculation between data entries via a form in Sage CRM.

How do I perform these calculations?


Resolution:

Calculating fields can be used to perform basic mathematical operations.
This solution discusses how to create a calculating field from within the Opportunity entity.

In order to create a calculating field, use Integer or Numeric type fields. For example, under the Opportunity entity, create three Integer type fields named as follows:

oppo_length
oppo_width
oppo_area

Add the fields to the desired screen and use OnChange scripts to do the calculations.


To do so, perform the following steps:

1- Open Sage CRM as an administrator and click on Administration -> Customization ->Opportunity (Screens tab) and then select Opportunity Detail Screen.
2- Select a field created previously above in the field list and click Add to insert them to the screen. (Repeat until all three fields have been added).
3- For each of these 3 fields, copy and paste the following script under the OnChangeScript window:
 oppo_area.value=oppo_length.value*oppo_width.value;
4- Click Update after copying and pasting the script for each field. and save your changes.

The oppo_area field should display the product of oppo_length and oppo_width.
Its value should be updated if the values of oppo_width and oppo_length changes.

N.B. Any combination of fields and mathematical expression is possible.
        Be careful to test Null or Zero values in the scenario of divisions before implementing.