<Entity name="contact">
   <MenuBar>
            <!-- Custom Menus that you may add -->
            <CustomMenus />
          </MenuBar>
<ToolBar ValidForCreate="1" ValidForUpdate="1">
            <Button JavaScript="var texttocopy;
var AddrL2;
if(!IsNull(crmForm.all.address1_line2.DataValue))
{
AddrL2 = ' ' + crmForm.all.address1_line2.DataValue + '\n';
}
else
{
AddrL2 = '

';
}
try
{
texttocopy = crmForm.all.firstname.DataValue + ' ';
texttocopy += crmForm.all.lastname.DataValue + '\n';
texttocopy += crmForm.all.jobtitle.DataValue + '\n';
texttocopy +=

crmForm.all.parentcustomerid.DataValue[0].name + '\n';texttocopy += crmForm.all.address1_line1.DataValue + '\n';
texttocopy += AddrL2;texttocopy += crmForm.all.address1_city.DataValue

+ ', ' + crmForm.all.address1_stateorprovince.DataValue + '  '  + crmForm.all.address1_postalcode.DataValue + '\n';window.clipboardData.setData('Text',texttocopy);alert('Address

Copied to Clipboard');}catch(e){alert('Error');}">
              <Titles>
                <Title LCID="1033" Text="Copy Address" />
              </Titles>
              <ToolTips>
                <ToolTip LCID="1033" Text="Copy Address to Clipboard" />
              </ToolTips>
            </Button>
          </ToolBar>
        </Entity>


4. Import the ISVConfig.xml file back into CRM.

5. Refresh your CRM in the browser, open a Contact record, and test your button out.

Happy copying and pasting!

Tip: You may need to go to the Settings > Administration > System Settings > Customizations tab in CRM 4.0 to indicate that you want the ISVConfig customizations to show in the web and/or Outlook clients. In 3.0 you need to edit a config file on the CRM server (more info about this is in the SDK).

When working with Contact records in Microsoft Dynamics CRM, you might find it frustrating if someone asks you to send them the address of a particular contact. You either have to re-type it or copy it line by line. To save yourself the headache, use the ISVConfig customizations in CRM 3.0 or CRM 4.0 to add a button to the Contact form that lets you copy the address to the clipboard. The example below illustrates how to do this for the Contact.

1. In the CRM Customizations area, go to "Export Customizations"

2. Export the ISVConfig.xml file and save this file. Make a copy for backup.

3. Edit the XML in Notepad or Visual Studio. Place the following code between the <Entities></Entities> tags: