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
Lynn Magers-PardoLynn Magers-Pardo 

Creating a custom object for auto assignment rule via US Zip Codes

Hello,

I am a "button click admin" that needs a lead assignment rule based on US zip codes. SFDC best practice is to build a custom object and place a table of zipcodes to assign within it, i.e., use it as a lookup.
Unfortunately, I don't know how to build a custom object, I'm a button click admin.  
However, I do have a table of zipcodes for assigning my leads.
(Up to now, I've been importing the leads after using a VLOOKUP function to assign the leads.)
This is how SFDC help file describes the design for custom object:
Design

•Create a custom object called ‘Zip Codes’. Create fields as necessary, including the following: Zip Code (text, 10 characters) and Sales Rep (user lookup). Make the ‘Zip Code’ field an external ID.
•Create a trigger which will do the follow. On creation of a Lead, use the zip code to run a query on the ‘Zip Codes’ object to identify the Sales Rep for that zip code, and assign the Lead to the Sales Rep.

The solution works even better if the customer already maintains a spreadsheet of Zip Codes and associated Sales Reps. In this instance, they can convert the spreadsheet into a CSV, and upload the CSV of all Zip Codes.


Does anyone know of a good video to show me how to build a custom object to for this? Or better yet, some existing code to share?
Thanks for your help.
Lynn 
Ramu_SFDCRamu_SFDC
Follow the below article to create a custom object

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_qs_customobject.htm

The below youtube video might help

http://www.youtube.com/watch?v=KrVgAplAZec
Lynn Magers-PardoLynn Magers-Pardo
Thank you, for the video, Ramu. I appreciate it! Lynn
Daniel BrandeisDaniel Brandeis
Hi Lynn, I'm sort of in the same boat you were in.  I am unfamiliar with creating objects and need to make a zip code table that allows for multiple sales reps to be on an account.  Would also love to build this forleads as well.  Any guidance is appreciated.  Thank you!
Lynn Magers-PardoLynn Magers-Pardo
Hi Daniel,

I wish I could help you. I haven't built it, yet, primarily because I'm swamped with other Admin work and don't have the concerted time to practice and learn how to do it. We also do not have a full instance Sandbox, i.e., one where I could see the object funtion with real records. 
If you decide to tackle it, please let me know how it works out.

Regards and Good Luck to You!
Lynn