locked
Can you update a lookup using a custom field rather than name? RRS feed

  • Question

  • I have an issue where I'm updating a lookup and I have identical names but a custom field labeled Value(new_value)  Can I build the array using lookupItem.new_value rather than lookupitem.name?
    Withers *Check out my javascript working examples on my blog http://withersblog.withersdavid.com/
    Tuesday, June 15, 2010 5:34 PM

Answers

  • A lookup is an actual class made up of:

    Attribute Type Description
    id String The GUID of the item. Required for set.
    type Integer Deprecated. The entity type code.
    typename String The entity name of the item. Required for set.
    name String The name of the item to be displayed. Required for set.

     

    There won't be any such lookupItem.new_value.  That being said, you can put whatever string you want at name and I will even appear.  However, the next time the record renders it will show up with the "correct" name of that record because the application is building the lookup from the data in the data base.

    Lookup fields are arrays of length 1 and the typename has to match the type of the entity assigned to that field.

    Customer fields are lookup arrays of length 1 where the type can be either an Account or a Contact.

    etc

    Am I even close to answering your question?

    • Marked as answer by David Withers Tuesday, June 15, 2010 6:16 PM
    Tuesday, June 15, 2010 5:58 PM

All replies

  • A lookup is an actual class made up of:

    Attribute Type Description
    id String The GUID of the item. Required for set.
    type Integer Deprecated. The entity type code.
    typename String The entity name of the item. Required for set.
    name String The name of the item to be displayed. Required for set.

     

    There won't be any such lookupItem.new_value.  That being said, you can put whatever string you want at name and I will even appear.  However, the next time the record renders it will show up with the "correct" name of that record because the application is building the lookup from the data in the data base.

    Lookup fields are arrays of length 1 and the typename has to match the type of the entity assigned to that field.

    Customer fields are lookup arrays of length 1 where the type can be either an Account or a Contact.

    etc

    Am I even close to answering your question?

    • Marked as answer by David Withers Tuesday, June 15, 2010 6:16 PM
    Tuesday, June 15, 2010 5:58 PM
  • I think you basically said no.  Thus answering my question.
    Withers *Check out my javascript working examples on my blog http://withersblog.withersdavid.com/
    Tuesday, June 15, 2010 6:16 PM