You need to sign in to do that
Don't have an account?

New to salesforce : Using Lookup to populate a hidden id field
I have a custom object which for instance has a product_id field. I want to have a lookup field in my UI
that displays a list of all products and when i select one of the products, the value displayed in my field on the UI should be the product name while behind the scenes i want the product_id from the lookup to be stored on my custom object. Can this be done using native UI without using visualforce?
the problem I am grappling with is that I do not want to create a product_name field on my custom object since I only want to store the ids when i save my object.
Please bear with me if this is a basic question since i am new to visualforce and salesforce.
Thanks.
The native Lookup field works exactly the way as you described. You will see product name in UI, but behind the scene, in the code it actually stores the product id.