We would like our Staff (interal salesforce users) to be able to populate a field based upon a lookup of data in a custom object when submitting a Case.

In contrast we also have an online form for anonymous users to submit a Case and we want them to input their own reference but not have it looked up. We can not have any validation against this field so it should be left as free text but mandatory.

Any thoughts or is 2 fields necessary (I really assume it is necessary as we can't use a lookup field to store information that isn't available in the lookup table...).


1 Answer 1


You would need to store the second reference string in a separate field. Attempting to update a lookup field with anything other than a valid record ID (or null) will result in an error being thrown, and any changes to the record will not be committed.

  • As expected, I have this setup in dev just now so they'll have to live with it. Thanks
    – n34_panda
    Commented Apr 15, 2016 at 12:52
  • 1
    Our users have had to live with much worse! If they want a single field to view, you can give them a formula field that determines which data to display (either data from the lookup record or if that's blank, data in the free-form text field).
    – JCD
    Commented Apr 15, 2016 at 13:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .