locked
Help adding a field to the Address table and populating it. RRS feed

  • Question

  • 2013 On Premise environment.

    Hello,

    Our business has a requirement to record the state and country ISO codes. On the lead the country and state are selected and I make an OData call client side and get the proper ISO code and store it in a hidden field.

    I have updated the mapping to contact so when the lead is qualified the ISO is moved along to the contact record.

    Now looking at the backside I see something quite different than I expected.

    It *SEEMS* that the lead address is copied to the CustomerAddress base table. My ISO address fields however are added to ContactBase table.

    So....it seems as though to get...what is for our situation...a complete address my query has to pull from the CustomerAddress entity and the contact entity....?

    I can do this but is this correct? Perhaps I am implementing the ISO fields incorrectly thus causing this mismatch?

    TIA

    JB

    Monday, January 20, 2014 8:27 PM

Answers

  • You will need the mappings to get data from lead to contact. The plug-in would map/copy the contact (new address field) to the customeraddress (new field). By default only the OOB address fields of contact are related to OOB address fields on customeraddress.

    Hope this helps!


    If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'

    • Marked as answer by zzpluralza Monday, January 20, 2014 10:33 PM
    Monday, January 20, 2014 10:23 PM

All replies

  • You are correct. The primary and alternate address fields of Account and Contact are treated specially. In that, address records get created when you fill these fields on account/contact. However, when you add custom fields to Address entity by default there is nothing to say which fields they relate to on a account/contact. This is one of the limitations of the OOB address feature.

    As a workaround, you can write a plugin to copy the fields from account/contact entity to the address entity. This way your query can still be on the address entity and doesn't require to be joined with account/contact.


    If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'

    • Proposed as answer by Mamatha Swamy Monday, January 20, 2014 9:12 PM
    Monday, January 20, 2014 9:12 PM
  • So if I write the plugin...which I am very likely to do this afternoon...do I need the mappings to contact record? It seems I don't and could remove them as my plugin will handle the "mappings"

    Monday, January 20, 2014 9:19 PM
  • You will need the mappings to get data from lead to contact. The plug-in would map/copy the contact (new address field) to the customeraddress (new field). By default only the OOB address fields of contact are related to OOB address fields on customeraddress.

    Hope this helps!


    If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'

    • Marked as answer by zzpluralza Monday, January 20, 2014 10:33 PM
    Monday, January 20, 2014 10:23 PM