How to keep Lead status dropdown editable after Lead converted?

How to keep Lead status dropdown editable after Lead converted?

Currently Sugarcrm makes the Status field inactive once the Lead converted.

Parents
  • Hi Hiren Darji,

    Do you mind sharing your use case for wanting to keep the Status editable? Do you also want the results of a conversion disassociated from the Lead when a user manually changes it to an unconverted status?

    When a Lead is converted, the following happens to the database record for that Lead:

    leads.converted changes to '1'

    leads.contact_id is populated

    leads.account_id is populated

    Some considerations to Note:

    • If the leads.status is changed from 'Converted,' there will be no UI indication that leads.converted = '1.' Any customization made to allow the changing of Status will need to toggle leads.status back to '0' when it is changed from 'Converted.'
    • When leads.account_id is populated, but the Account Name (leads.account_name) is editable in the Lead, then this field will automatically revert to the name corresponding to leads.account_id upon save. Any customization made to allow the changing of Status should reset leads.account_id back to NULL when it is changed from 'Converted.'

    In Sugar 7.7, the Status field can be line-edited in a Leads subpanel. This is a defect because there are a few working pieces behind the scenes when a Lead is converted, and changing the Status away from Converted has historically created confusion for users as the behind-the-scenes functionality continues.

  • Hello Patrick McQueen sir,

    Our sales team create leads, once the status goes to demo, they convert lead, just to create contact and account, so our logistic department send them testing material. And our sales team, need lead back to status in process, so they can do followup leads.

    They want the created contact and account to be as it is, after status change from converted to in process.

    It means, just want small change so that Status field remain active anytime (just like sugarcrm 6.5).

Reply
  • Hello Patrick McQueen sir,

    Our sales team create leads, once the status goes to demo, they convert lead, just to create contact and account, so our logistic department send them testing material. And our sales team, need lead back to status in process, so they can do followup leads.

    They want the created contact and account to be as it is, after status change from converted to in process.

    It means, just want small change so that Status field remain active anytime (just like sugarcrm 6.5).

Children
  • Hi Hiren Darji,

    The code that sets the Convert field to Read Only when the Lead is converted can be found in ./modules/Leads/metadata/dependencydefs.php.

    The active ingredients of the file read:

    $dependencies['Leads']['status_read_only'] = array(

        'hooks' => array("edit"),

        //Trigger formula for the dependency. Defaults to 'true'.

        'trigger' => 'true', 'triggerFields' => array('converted'), 'onload' => true,

        //Actions is a list of actions to fire when the trigger is true

        'actions' => array(

            array(

                'name' => 'ReadOnly', //Action type

                //The parameters passed in depend on the action type

                'params' => array(

                    'target' => 'status',

                    'label' => 'status_label', //normally <field>_label

                    'value' => 'equal($converted,"true")',

    ),),),);

    I recommend making any changes affecting this stock functionality in the custom directory so upgrades do not undo your modifications.

    Kindly let us know if this helps.