AnsweredAssumed Answered

Show Primary address Street 1 and 2 in Address block

Question asked by sonesay inthavong on Jul 14, 2015
Hi All

Is there a way to show Primary Address Street 1-2 separately in the Address Block?





Update 1 :

I was able to show the fields I want by editing include/SugarFields/Fields/Address/SugarFieldAddress.php

    private function getDisplayParamsForFields($key, $module)    {

        $bean = BeanFactory::getBean($module);

        return array(
            'street' => $bean->field_defs[$key . '_address_street'],
            'street2' => $bean->field_defs[$key . '_address_street_2'],
            'street3' => $bean->field_defs[$key . '_address_street_3'],
            'state' => $bean->field_defs[$key . '_address_state'],
            'city' => $bean->field_defs[$key . '_address_city'],
            'postalcode' => $bean->field_defs[$key . '_address_postalcode'],
            'country' => $bean->field_defs[$key . '_address_country'],
        );
    }
}




When Saving





There is only leads.primary_address_street field in the leads table. Would It be possible to add in the 2 missing fields and modify the code to save them and retrieve the values from there or Should I just create custom fields and place them on there. There is of course the issue with displaying them together in the display view.

Outcomes