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
Lee SinLee Sin 

How can I store the driving distance of to address fields of a Record

I have two address fields on Account. 
I need to create a new field to store the driving distance of these two fields.
Right now, I am using Google Map and VF page to display the distance of the two addresses but the distance is calculated every time the user opens the record.

There are two situatations:
a1. the two addresses are static.
a2. the two addresses are prone to be changed.

b1. the distance is the direct distance
b2. the distance is the driving distance

What approaches am I able to always have a field showing the up to date distance of the two fields?




Shashikant SharmaShashikant Sharma
Generally for showing up address on google map geo location in saved in database and calculated only if address is changed. I would like to see you VFP code how you are calcualatiing distance , may be then I could suggest any thing here.