web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

setting an address as primary or secondary in CRM address entity or custom

(0) ShareShare
ReportReport
Posted on by

has anyone ever run into the issue of needing to set an address as primary through a checkbox in CRM through the OOB address entity or custom address entity if needed 

I need to keep a list of address types (home, business, etc) for a contact and designate one as primary the rest as secondary and switch on and off if need be

finally I need to display the primary only on other entities as well

any way to do this other then a plugin? (javascript, business rules etc) 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at

    Hi Lucky,

    I believe you should be able to do this with Business rules and a custom checkbox linked to the condition for the Primary address fields of your choice, however it will only work with the fields so you may have to remove the composite address from your form.

    ps- also include your custom Primary address checkbox in your entity relationship field mappings so the value is inherited to the related records.

    Does this help? Kindly tick 'Yes' to Verify :)

    Best Wishes, Raz

  • Community Member Profile Picture
    on at

    so for example your suggesting not only have a main checkbox for is primary but if it is checked, have a checkbox linked to each address field and tick those off via the rule and do a mapping based on that condition of the fields I want to the other forms

  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at

    Hi Lucky, have a checkbox to represent all of address1 fields, and another for address 2 fields, so you can show/hide accordingly with business rules.

    you have the option of mapping fields only of you need your child records to inherit the primary / secondary addresses but it may not be required in your scenario.

    Let me know if this works for you

    Best Wishes, Raz

  • Community Member Profile Picture
    on at

    thanks this helps a lot let me add something else to help be more clear

    currently I use the contact entity to relate to address entity and as I update an address in the address within the address  entity the address appears in a subgrid in the contact entity.

    it is within the address entity I state is the address a primary address vis a check box

    what I want to do is within the contact record show the primary address while the subgrid below the primary address displays all related addresses

    As a new primary address is designated it will show within the contact record and  the previous address moves to the subgrid

    finally I am looking to prevent when someone selects more then one address to be primary CRM should not let you do so and allow the user or deselect the current primary address and make the new address primary

    hope this helps

  • Suggested answer
    ShawLevin Profile Picture
    on at

    We had this requirement and implemented it using some plugins.

    The primary address is designated by having addressnumber = 1. You need to change that when the user selects the checkbox. However the system does not allow two addresses to have the same number. We solved this by having JS change the address number to 9999 on save and having a plugin switch the numbers behind the scenes. 

  • Inogic Profile Picture
    682 on at
    You need to write plugin or workflow which will triggered on change of Primary Checkbox field  of Address entity.
    And in that plugin/workflow assembly you need to retrieve the address entity records related to contact .So, if you found multiple address records then set Primary Checkbox equal to false and update that address records then set primary address of contact and update contact entity record.
    Thanks,
    Sam

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans