Support Portal ContactGet in touch

UK Formatting for Address Composites in CRM 2015

   Words by CRM Consultancy

   on 29/05/2015 13:20:42

CRM 2015 introduces the ability to edit a Company or Contact Address via a single Memo field, allowing a single break-down of fields instead of viewing each line of the address individually.

So we have:

image5

Instead of:

image2

 

However many clients of CRM prefer a fixed UK-format for an Address, as opposed to the ‘State/Province’ or ‘ZIP/Postal Code’ terminology, so how can we vary how the fields in this address box appear?

There is no out of the box method of customising the fields once they are part of the Address Memo field, which gives us a problem. 

However, by the introduction of a piece of Javascript we can work around this problem.

If we add a block of script onto the Form and then run this script onLoad, we can change the Label used for the Address pop-up:

function setAddressCompositeToUKFormat() {

Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_line1").setLabel("Street 1");

Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_line2").setLabel("Street 2");

Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_line3").setLabel("Street 3");

Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_stateorprovince").setLabel("County");

Xrm.Page.getControl("address1_composite_compositionLinkControl_address1_postalcode").setLabel("Postcode");

}

Once done – we can see the pop-up composite in our revised format:

image8

This is not a perfect solution, as this block of Javascript then needs to be applied to each applicable Form within our solution (typically Account, Contact and Lead) but otherwise gives a simple solution to use the Address Composite functionality without immediately appearing in US-Format which can be off-putting for some users – and thankfully the introduction of Web Resources in CRM 2011 gives us a method of using a common Web Resource applied to each form to avoid too much copy and paste code.

For more information, the following links may be useful:

https://www.magnetismsolutions.com/blog/paulnieuwelaar/2013/10/22/working-with-dynamics-crm-2013-composite-fields-fly-out-menu

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

CRMCS Quick Start Guide: How To Produce a Microsoft Teams Live Event Dynamics 365 Marketing: Lead Scoring and Sales Acceptance Designing and Developing Microsoft Power Apps Portals Thank You for Attending CRMCS’ Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Thank You for Attending Our Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Webinar: Discover How CRMCS Have United Dynamics 365, SharePoint and Microsoft Teams To Create Sales Excellence Ignite your workflow by adding DocDrive365 to Office 365 The CRMCS guide to everything you need to know about integrating Teams with Dynamics 365 Saving Time By Keeping Documents In One Place TDE Database Encryption with On Premise Dynamics The Key to Successful Compliance in 2020 Part 2: Let’s get GDPR Compliant with Microsoft Power Automate Top 3 Essential Tips for Remote Working Dynamics 365 Marketing: Top 5 Best Features Dynamics Day in the Life - Puma Investments Can you use Teams to amplify collaboration in Dynamics? Part 1: Using a Scheduled Power Automate to Trigger Expiry Date Reminders The secrets of successful document collaboration in Dynamics CRMCS launches new AppSource approved DocDrive365 Dynamics Day in the Life - Moneypenny Release Management Add the App to Dynamics DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Building a New Scheduled Process using Flow
  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
Manchester
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue
London

Content © CRM Consultancy.