You need to sign in to do that
Don't have an account?
Steve Berley
Address changed but can't capture when re-geocoded
I have a join table that connects two accounts. One of it's fields is the distance between the accounts. Using the location class, I can easily determine how far apart the billing addresses are for both accounts when created or editing the join record.
However, if one of the accounts moves to a new address, I can’t capture the event to update the distance since I can’t seem to identify when the re-geocoding is complete.
Currently, my trigger is as below..
This isn't catching the event so needsUpdate is always blank.
Also, the Data Integration rule is NOT set to bypass triggers (see below).
Has anyone figured a way around this problem?
Thanks a ton for your help...
Steve
However, if one of the accounts moves to a new address, I can’t capture the event to update the distance since I can’t seem to identify when the re-geocoding is complete.
Currently, my trigger is as below..
if(trigger.isAfter && trigger.isUpdate){ set<id> needsUpdate = new set<id>(); for (account is : trigger.new){ account was = trigger.oldMap.get(is.id); if( is.billinglatitude != was.billinglatitude || is.billinglongitude != was.billinglongitude) needsUpdate.add(is.id); } // call to update the distance }
This isn't catching the event so needsUpdate is always blank.
Also, the Data Integration rule is NOT set to bypass triggers (see below).
Has anyone figured a way around this problem?
Thanks a ton for your help...
Steve