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 Reply Children
  • This is strange! It should work..

    Lets debug using

    $GLOBALS['log']->fatal($lead->industry_c); // add this above your added custom code

    Run it again and see if you have the value in sugarcrm.log

    And along with that, check in database in accounts table with newly created ID if it has value in industry field.

  • Sorry, didn't work

    I put the log line there:

    convert_lead2.png

    Did the repair:

    Repair_1.png

    Repair_2.png

    but the only lines from today in my log are:

    Fri Feb 5 15:42:30 2016 [24445][-none-][FATAL] SECURITY: User authentication for paul.bernard failed

    Fri Feb 5 15:42:30 2016 [24445][-none-][FATAL] FAILED LOGIN:attempts[1] - paul.bernard

    as I canceled the conversion of the lead, my last record in account table is old:

    mysql> select max(date_entered) from accounts;

    +---------------------+

    | max(date_entered)   |

    +---------------------+

    | 2016-01-12 16:25:45 |

    +---------------------+

    1 row in set (0.02 sec)

    mysql> select max(date_modified) from accounts;

    +---------------------+

    | max(date_modified)  |

    +---------------------+

    | 2016-01-12 17:02:16 |

    +---------------------+

    1 row in set (0.00 sec)

    and just to be sure I'm modifying this file:

    public_html/sugarcrm/modules/Leads/views/view.convertlead.php

    and the log I'm looking is:

    public_html/sugarcrm/sugarcrm.log

    all the best,

    Daniel

  • Hello Daniel,

    Can you make sure you dont have custom/modules/Leads/views/view.convertlead.php ?

    If you have, the changes should be made to that file. And if you dont have it, it is always recommended to copy the original file and paste it in custom folder.

  • Hi,

    I didn't have the views folder under /public_html/sugarcrm/custom/modules/Leads/

    now I created and copied the modified file:

    # pwd

    /home/consquest2014/public_html/sugarcrm/custom/modules/Leads/views

    # ls -la

    total 48

    drwxr-sr-x 2 4096 Feb  9 08:43 ./

    drwxr-sr-x 6 4096 Feb  9 08:42 ../

    -rwxr-xr-x 1 38970 Feb  9 08:43 view.convertlead.php*

    convert_lead.png

    I also removed the lines from the original file.

    did a repair, but nothing happened. and still no entries in the log.

    same problem.

    Must be something really dumb that I'm doing. Maybe you could assume that I know nothing and start from scratch, asking me really newbie questions. Maybe I'm missing something that you assume I should know.

    all the best,

    Daniel.

  • Hello,

    I cannot guess what could go wrong. Add me to Skype - hashsoftech and we shall look together, it will be a quick check and solution I hope so.

  • Hello,

    $this->focus->industry = $this->focus->industry_c;

    This does the trick! (Condition: When you have the field in Convert Lead form.)