function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
D. PellegriniD. Pellegrini 

Calculated Opp Amount with Professional Edition?

We have a number of custom Amount fields on an opportunity record, including an view-only field that totals all of them up.  I need to get this value into the standard Amount field - but cannot seem to find a way.
 
We are running PE, so no access to Workflows.  Basically on edit of an Opportunity I would like to push the calculated field value into the Amount field.
 
Anyone done this before on PE?
JakesterJakester
Are you putting products on the opportunity? If so, the total amount field cannot be manually set - it's always going to be the sum of the line items. If not, then there are ways to do this, but none of them particularly elegant without Enterprise Edition's workflows. For example, you could get the excellent DBAmp made by ForceAmp and run a scheduled job every half hour or so to update that field using a SQL update statement.
D. PellegriniD. Pellegrini
We are not using products.  There is an interesting link in the help system, but try as I might I can't seem to get it to do anything.


The definition behind the native Opportunity Amount field does not allow for the creation of a formula field. As a result, the amount field on opportunities cannot be a calculated value based upon other fields on the Opportunity record. 

The Solution is as follows: 

1. Create a custom field on the Opportunity to perform the requested calculation. 
2. Create an S-Control that edits the Opportunity, placing the custom field's value (the one created in step 1) into the Amount field on the Opportunity. 
3. Create a custom link or formula field (see below) that will invoke the S-Control when clicked. 

- Sample code has been provided for the S-Control in Step 2 in the "Attachments" section of this record. (NOTE: Replace the merge field {!Opportunity_Requested_Price} in the provided code with the calculated field in your Opportunity configuration (step 1)). 

- Additionally, the following is an example of a formula field that will invoke a given scontrol: 

HYPERLINK("/servlet/servlet.Integration?lid=01N30000000D0vg&eid="&{!Id}, "Update" ) 
(NOTE: The record ID in the above should be replace the record ID of your S-Control, created in step 2).



Paying 2x our current subscription rate just to update this field seems kinda rough...
QuiqueprQuiquepr

D. Pellegrini wrote:
We are not using products.  There is an interesting link in the help system, but try as I might I can't seem to get it to do anything.


The definition behind the native Opportunity Amount field does not allow for the creation of a formula field. As a result, the amount field on opportunities cannot be a calculated value based upon other fields on the Opportunity record. 

The Solution is as follows: 

1. Create a custom field on the Opportunity to perform the requested calculation. 
2. Create an S-Control that edits the Opportunity, placing the custom field's value (the one created in step 1) into the Amount field on the Opportunity. 
3. Create a custom link or formula field (see below) that will invoke the S-Control when clicked. 

- Sample code has been provided for the S-Control in Step 2 in the "Attachments" section of this record. (NOTE: Replace the merge field {!Opportunity_Requested_Price} in the provided code with the calculated field in your Opportunity configuration (step 1)). 

- Additionally, the following is an example of a formula field that will invoke a given scontrol: 

HYPERLINK("/servlet/servlet.Integration?lid=01N30000000D0vg&eid="&{!Id}, "Update" ) 
(NOTE: The record ID in the above should be replace the record ID of your S-Control, created in step 2).



Paying 2x our current subscription rate just to update this field seems kinda rough...


Dan:

I cannot see the attachments section of the post. Can oyu please let me know where to get the sample s control code. I need to fdo exaclty the same thing in PE...

Thanks,
Quique
enrique.ortiz@tvmcompany.com