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
jgoehringjgoehring 

Basic Lookup question

I have a field in the Opportunity object called Sales Rep ID.  Rather than hand-keying the 100+ Sales Reps we have, I'd like to do a lookup on a list of them.  I've been doing a little reading and it seems that they must be a Custom Object. How do I set this up?  Also, can this list be maintained and imported using Excel?

Thanks!
RickyGRickyG

You should read Creating On-Demand Apps, which explains what a lookup relationship is and how to implement it.  For information on importing data, a good place to start is this page, with resources about Apex Data Loader and other tools.

Hope this helps.

- RIck Greenwald

Developer Evangelist

jgoehringjgoehring
I will definitely read it however I didn't think that this would require create a custom app.  I'll take a look and see if I can find some info on how to use it.

Thanks for the quick reply Ricky
RickyGRickyG
Hey, you can't judge a book by it's title, or something like that.

You won't have to create a custom app, as you will see.  A lookup relationship will give you all the functionality you are looking for, with no code.  Data Loader gives you the ability to not only load data, but to do upserts, which will either update or insert a record, as appropriate.  Just be sure you have an external ID identified if you want to take advantage of upserts.

- Rick Greenwald
Developer Evangelist
adamgadamg
One more suggestion here - based on the use case, you may want to add the field (sales rep ID) to the user object, and then create a new lookup relationship between opportunity and user; in general to keep things simple its best to use existing objects for your data model if you makes sense to do so.