You need to sign in to do that
Don't have an account?
Kush Patel 5
Use an object's field user-input in an Apex Class
public class kushgeocode { public List<Account> acct {get; set;} public Integer radius {get; set;} public kushgeocode(ApexPages.StandardController controller) { radius = 10; acct = [SELECT Name, Geocodes__Latitude__s, Geocodes__longitude__s, BillingStreet, BillingCity, BillingState FROM Account WHERE DISTANCE(Geocodes__c, GEOLOCATION(40.6423077,-74.5680403), 'mi') < :radius ];I have a number field called Radius__c in my Account page. I would like to use whatever value the user inputs as my less than distance also known as "radius" in my code. So basically replace the value ten with the value of the field number given by the user in Radius__c. If anyone has a solution could you please let me know ASAP. Thanks.
That's why I need to take the value from my field number variable, Radius__c, and put it somewhere in the controller. Problem is, I don't know where to put it.