Leads Address vardef

I am trying to create address fields in the Opportunities module which have the same 'copy to ’ function as the primary and alternative address fields in Leads .

When looking at /modules/Leads/vardefs.php, every field apart from the address fields are defined.

Where are the primary and alternative address fields set in the leads module?

You can add the addresses fields through Studio, which will create each individual field for each address field group you are going to create, then you can apply the copy button just like it is defined at Leads editviewdefs.


1 Like

thank you.

I have created the address and all the fields shows up in studio, and data is saved and displayed properly.
However when i add the following to editviewdefs, the address data is not showing or being updated?

`'type' => 'address',
        'displayParams' =>
          'key' => 'primary',
          'rows' => 2,
          'cols' => 30,
          'maxlength' => 150,

if i remove ‘type’ => ‘address’ the data shows again, but i lose the copy to button

after looking at include\SugarFields\Fields\Address\DetailView.tpl i figured i needed to create the new address fields in extension framework and not in studio - so that the fields were named exactly the same as in the leads module. I.e. without _c being appended to the field name.

i could then make the changes to detail/edit viewdefs and the copy function works :slight_smile:

1 Like