[7.9]  Are there $variables that can be used in field default values, that do not require code customization?

I'm looking to set up default values on multiple fields that call $LBL_FIRST_NAME from the contact so it starts off with their name (if there is one) and can be changed by the end user.  

Example:  If an end user creates a call for client John Doe, the default subject line would read "Call with John", where 'John' is called by that $variable.  

Problem: I don't know the correct syntax for how to pull this off, or if it is even possible without code customization.  

Thank you in advance!

Parents
  • Hi Kyle Smith 

    You can, partially, setup it through Studio, by adding the formula bellow:

    concat("Call with ",related($contacts,"first_name"))

    Any field defined as calculated by Studio become readonly, so you need to edit the extended vardefs of such field in order to make it editable.

    As soon as you configure this formula and commit the change, edit the file custom/Extension/modules/Calls/Ext/Vardefs/sugarfield_name.php and replace the line

    $dictionary['Call']['fields']['name']['enforced']=true;

    to

    $dictionary['Call']['fields']['name']['enforced']=false;

    Save the file and run Quick Repair and Rebuild.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Sadly, we're on OnDemand at the moment so I can't edit the sugarfield_name.php file.  We're not quite ready to start doing customization on the .php files just yet.  

    Thank you again for your input!  

Reply Children