How can we add additional address fields in 7.2?

How can we show address 2 in the on-demand 7.2 version of Sugar?  We can't be the only ones out there who need this capability, are we missing something obvious or does sugar not allow people to have secondary, or third, addresses?
Parents
  • Hello,

    You can use these steps to create a 'Address 2' field and add it to the Address block in each module:

    1. Login as an Administrator and navigate to Admin > Studio.
    2. Select the module where you want to add the 'Address 2' field, then click Fields and select Add Field.
    3. Use the Field Type 'TextField' then enter the relevant information, so that it appears similar to this screenshot:
    4. Save the new field.
    5. Access your SugarCRM File System and navigate to the following location:
      ./custom/modules/<Module>/clients/base/views/record/
    6. - If this directory does not exist, you can easily create it by going to Admin > Studio > <Module> > Layouts > Record View, and clicking 'Save & Deploy.'
    7. Open the 'record.php' file in a text editor.
    8. Locate the following array:

      - The 'name' values may be slightly different based on the Module you're working in.
    9. At the end of the 'array( 0 =>)' add a new line, then enter the following code:
       |
      - You'll need to adjust the 'name' and 'placeholder' values to match the field you created.
    10. You'll need to update each of the subsequent arrays, so that their numeric value is one greater, so the original '1 => array()' should become '2 => array()' and so on until the address field arrays are numbered correctly.
    11. Save your changes to this file.
    12. Return to Sugar, then navigate to Admin > Repair and use Quick Repair and Rebuild.
    13. If you navigate to your module and click the Edit button, you should see that there is now a second line in the address field block:

    You'll need to use these steps for each Address Block in each module, but it does provide the ability to add additional fields.

    Regards,

    Dan Kallish
    Technical Support Engineer
    SUGARCRM

  • Excellent Dan, very easy to follow your instructions, I will simply comment that the path to the file seems to be different... my environment is SugarEnt-Full-7.2.0/custom/modules/Leads/clients/base/views/record  (base and views are reversed), and also that you should not forget to modify the array to "copy to alternate address", or it wont work!  Thanks again
  • This is all great, but what about the on-demand environment?  This cannot be done through Studio.
  • Hello,

    That's correct, but you can create a Module Loader package that would allow you to implement this change.  For more information, check out the Sugar 7.2.x Developer Guide section here - http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.2/70_API/App...

    Regards,

    Dan Kallish
    Technical Support Engineer
    SUGARCRM
Reply Children
No Data