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
umesh1234umesh1234 

java script Button

Friends i am stuck in javascript button,

Scenarion:
In list view i want to select a records and i want to popup total Annual revenue of selected opportunity

Using Javascript
umesh1234umesh1234
I wrote this javascript nw it is displaying Record Id in alert Box.
now I want to Add amount from selected Records

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} 

var records = {!GETRECORDIDS($ObjectType.Opportunity)}; 
var strIDs=''; 
if (records[0] == null) 

alert('Please select a record'); 

else 


for(var n=0;n<records.length;n++)


alert('Thank y'+records);
}