The DISTANCE function is now supported with location-based queries. You can calculate the distance between two location values, such as between a warehouse and a store.
Continue reading “Location-Based SOQL Queries”
Working with Apex Trigger in salesforce
Trigger is piece of code that is executes before and after a record is Inserted / Updated / Deleted from the force.com database.
A trigger is Apex code that executes before or after the following types of actions:
Location-Based SOQL Queries
The DISTANCE function is now supported with location-based queries. You can calculate the distance between two location values, such as between a warehouse and a store.
DISTANCE() now works with location and address fields. You can retrieve a specific distance (say, of a store from a contact’s location) and display it to the user.
Continue reading “Location-Based SOQL Queries”