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
Frank_LopezFrank_Lopez 

how can I define a field like opportunity expectedRevenue?

I noticed that opportunity's expectedRevenue field is calculated and it only appears on the view page, and it is absent from the edit page.
 
Question: Is there anyway I can define my own fields to act the same way?
 
I'm asking because I'm doing some testing of an app that uses the AppExchange SOAP API, and it would help if I could define my own fields similar to expectedRevenue.
 
Thanks,
 
Frank
 
Ron HessRon Hess
Yeah, that would be the "Formula Field" , you can create a custom field that does math, and is readonly.
check it out in the online help, this a standard feature, no API needed to create and use one.
ahsensaeedahsensaeed
Frank you will face a problem that in the formula  you will not be able to add the opportunity line items and show it in the opportunity mast record. We have faced the same problem for which i figured out two soultions that are as follows
a)  After adding all the line items click on an S-Control in order to caluclate the total of line items and store it on opportity level
b) Add line item on a popup window ( custom screen popped up by an S-Control) , this way when ever the popup window is closed the scontrol automatically updates the opportunity total and user donot have to click the S-control link in order to show the updated amount.
 
For further help and discussion you can feel free to contact me at
 
ahsen saeed