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
aezellaezell 

Where Should This Code Live?

This is a bit of a structure question, as I am trying to wrap my head around all the various moving parts of the Salesforce platform.

Let's say I wanted to save the latitude and longitude of a lead's location when that lead is created or modified.

What I can't figure out is if I should write code in a trigger, a custom SObject, or some other place. Also, if I do it in a trigger, does that code have the capability to access an external web service, like the Google Maps API? I know that a SObject can, but my problem there is I'm not sure how to "activate" on SObject each time a Lead is created or modified.

Maybe this has something to do with creating a custom button or something. I'm just a little lost with all of the options here.

Can someone please point me in the right direction?



Message Edited by aezell on 08-29-2007 09:02 AM