Hello All
I have a few custom fields i created for the leads tab and would like to display those fields on another module... how would i go about doing this?
Thanks a ton!
Hello All
I have a few custom fields i created for the leads tab and would like to display those fields on another module... how would i go about doing this?
Thanks a ton!
I can seriously use some help. Anyone that may be able to at least guide me on the right path... i'd really appreciate it.
Can someone tell me if this is even possible?
There seems to be tons of other threads posing this same question, and none of them have ever been responded too. I'm sure this would be quite usefull information for the average SugarCRM user.
Anyone out there able to help me out?
If you mean reuse dropdowns, you can - just create the new fields in the new modules based on the same custom dropdown.
Or do you mean shown fields from one module that is related to another? Eg. Show the account's city in a related contact's oportunity?
Or as you refer to leads, do you mean take over some custom fields when that lead is modified into an account proper?
Both actually. Lets say i have a custom field in the LEADS module for "Opener"; i would like to be able to take that field and also be able to use it in the ACCOUNTS module, so if a change is made to the "Opener" field in the leads module, the changes will also reflect in the accounts module, and vice versa.Or do you mean shown fields from one module that is related to another? Eg. Show the account's city in a related contact's oportunity?
Or as you refer to leads, do you mean take over some custom fields when that lead is modified into an account proper?
I would like to know how to do this for both dropdown and data fields.
Your advice on dropdowns will not allow changes made to the field in one module to be reflected in another, so that particularly is not what i am looking to achieve.
Thanks again for your help.
Follow these steps to implement this use case that you outlined:
1. Add a custom field to leads module.
2. Add another custom field to accounts module.
3. To sync values across modules you will need to write some php code.
3a. open lead.php in an editor and locate the save method, if it does not exist copy save methods signature from sugarbean.php
3b. In this method you can update the value of custom field in accounts table. update the table directly instead of using an instance of other bean to do it.
3c. do the same modification in Accounts.php.
-Ajay
Ajay,1. Add a custom field to leads module.
2. Add another custom field to accounts module.
3. To sync values across modules you will need to write some php code.
3a. open lead.php in an editor and locate the save method, if it does not exist copy save methods signature from sugarbean.php
3b. In this method you can update the value of custom field in accounts table. update the table directly instead of using an instance of other bean to do it.
3c. do the same modification in Accounts.php.
While i am extremely appreciative of your response, i unfortunately am somewhat of a beginner when it comes to SugarCRM and PHP coding and could use some more precise instructions in order to achieve these necessary changes.
I would greatly appreciate any help offered by yourself or any other SugarCRM user.
Thanks in advance.
For further info - if you want a custom field in leads to update the same or another field in the subsequently created account during the convert process, you could do the following: (this is based on a quick hack I did to populate fields when creating a new record from a 'previous' screen)
1. Edit modules/Leads/DetailView.html
At the top, you will see the DetailView form. this determines what values are posted on the edit, duplicate, delete or convert buttons. Just add a line for the custom variable eg:
Pick the appropriate custom field name as you have defined it. In this example it's: "lead_custom_opener_field_c".Code:<input type="hidden" name="my_custom_var1" value ="{lead_custom_opener_field_c}">
Now, on the next PHP page, that value will be in the variable $_REQUEST["my_custom_var1"] where you can use it to seed one of the form fields. If it's a dropdown, make sure the form had a custom field with the same custom dropdown assigned. If it's a text field, just drop it in. In modules/Leads/ConvertLead.php, before the "$xtpl->parse("main....." command in the section you want the field added, add something like:
where you are updating a custom dropdown (custom_openers). Or if you are just updating a field - do it like:Code:if (!empty($_REQUEST["my_custom_var1"])) { //make sure you have a value $xtpl->assign("OPTIONS_LEAD_CUSTOM_OPENER_FIELD_C", get_select_options_with_id($app_list_strings['custom_openers'], $_REQUEST["my_custom_var1"])); }
This all assumes that you have modified the ConvertLeads.html file with the new custom fields for the account. Unless if you just want to add the custom lead field to an existing account field, in which case, you can just update the existing one.Code:if (!empty($_REQUEST["my_custom_var1"])) { //make sure you have a value $xtpl->assign("LEAD_CUSTOM_OPENER_FIELD_C", $_REQUEST["my_custom_var1"]); }
Hope this helps
Last edited by stevec; 2006-09-08 at 10:34 AM.
Is it possible to have someone edit the appropriate pages for me, there are a couple of fields (text and dropdown), that i need to display on the lead, account and opportunity tabs and this seems a bit over my head for me to accomplish on my own. I am willing to pay a fee to have this done as well.
Please respond if you are willing, thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks