Leads custom field that exists in Account

Hi Gurus,

Is there a way to put a field in the leads module that already exists in the account module.

SugarCRM CE 6.5.22.

For instance, I have a request to insert a custom field in the leads that is the annual revenue of the company. If a put a custom field (_c), then, when the lead is converted I will have to enter the information again in the account part because the account already have a annual revenue field. So, is there a way to reuse the account field in the leads part in a way that, when I convert the lead, the revenue information will be in the account information?

all the best,

Daniel

Parents
  • If you create the same field name (exactly) in Leads, and then copy the convertdefs.php file from modules/Leads/metadata/ into custom/modules/Leads/metadata, adding in your field to the array of account fields, it should display.

  • I cannot create a field with same name because sugar automatically puts the _c in the end of the field name. So, I have the field annual_revenue in account and annual_revenue_c in leads. Different names. When I convert the lead, the information cannot be passed automatically. At least, that is my knowledge about the subject.

  • Hello,

    You are right, Sugar will not copy over the values for different field names. What best you can do is, assign the value by extending view.convertlead.php

    Add, $bean->annual_revenue = $lead->annual_revenue_c;

    inside the loop after this comment > //Handle non-contacts relationships

    Looks like

    //Handle non-contacts relationships

            foreach ($beans as $bean)

            {

                if (!empty($lead))

                {

                    $bean->annual_revenue = $lead->annual_revenue_c;

    .

    .

    .

    .

  • Okay, that didn't seem clear when I read your post. You can go with Hash's suggestion, or, you can also create a custom vardef in Leads to create the "annual_revenue" field exactly the same as accounts, which will do so without the _c.

Reply
  • Okay, that didn't seem clear when I read your post. You can go with Hash's suggestion, or, you can also create a custom vardef in Leads to create the "annual_revenue" field exactly the same as accounts, which will do so without the _c.

Children
No Data