How to Execute the Javascript Functionality in Salesforce Custom Button: {!REQUIRESCRIPT(‘/soap/ajax/28.0/connection.js’)} var opportunityRecord= {!GETRECORDIDS($ObjectType.OpportunityLineItem)}; if (opportunityRecord[0] == null) { alert(“Please select at least one product to traffic.”) } else { Continue Reading »