Drop Down Value Shows the Key and not Display Value

Hey Guys,

We are trying to have a drop down value on a lead be transferred to a text field on an account during lead conversion. Our code is written below. Naics_sector is the account field and industry_sector is the drop down field on the lead. The conversion works, but only the drop down key is being brought into the text field and not the actually display value. How can we get the display value of the drop down brought into the text field? Thanks!

'fieldMapping' =>
array (

'naics_sector_c' => 'industry_sector_c',

Parents
  • Thanks Andre,

    The problem is that the industry_sector on the lead is a best guess, after a lead is converted to an account AND business is written then an actual NAICS code will be populated overwriting the industry sector. Guess we will have to find another way.

  • The text field still needs to be editable so we can import text into it that is not contained in the drop down field. So if we use getDropdownValue then the field is calculated and not editable then correct?

  • You can setup a field as calculated and editable at the same time. You just need to edit the custom/Extension/modules/<Module>/Ext/Vardefs/sugarfield_<field>.php and update the attribute 'enforced' to false.

    Additionally you will need to modify the SugarLogic Formula in order to only calculate it if the field is empty:

    ifElse(

       not(isInList(getDropdownValueSet("dropdown_list"), $naics_sector_c)),

       $naics_sector_c,

       getDropdownValue("dropdown_list", $industry_sector_c)

    )

    Run QRR after saving the file.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • This worked perfect, only question I have is why do we have to update the SugarLogic Formula. It currently only calculates only when the field is blank with only getDropdownValue("dropdown_list",$industry_sector_c)

  • I have considered updating the SugarLogic formula because I have no the big picture of such feature, so I tried to provide an explanation as complete as possible.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • I have considered updating the SugarLogic formula because I have no the big picture of such feature, so I tried to provide an explanation as complete as possible.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children