To access the field mappings area, you must create relationships between the following entities:
- Opportunity Product to Invoice Product
- Opportunity Product to Order Product
- Opportunity Product to Quote Product
- Quote Product to Order Product
- Order Product to Invoice Product
To do this, follow these steps for each set of entities:
- Start Microsoft Internet Explorer on the computer that is running Microsoft Dynamics CRM 3.0 Server.
- Type the following URL in the Address box of Internet Explorer:
http://localhost/MSCRMServices/EntityMap.asmx
- Click RetrieveEntityMaps.
- Type the schema name for a source entity in the entityName box, and then click Invoke. The source entity is the entity from which data is mapped. The following are the schema names for the source entities:
- The schema name for the Order Product entity is salesorderdetail.
- The schema name for Invoice Product entity is invoicedetail.
- The schema name for Opportunity Product entity is opportunityproduct.
- The schema name for Quote Product entity is quotedetail.
- A new window opens that contains XML text. Copy the entitymapid GUID that comes before the sourceentityname and targetentityname XML elements for the source and target entities that you want to map.
Note You can find the entitymapid GUID in the entitymapid XML element. The entitymapid GUID is similar to the following GUID: {1C4EC80A-AE71-DA11-AAAA-000D56C2E08A}
Assume that you type opportunityproduct in the entityName box before you clicked Invoke. In this case, the XML text that is displayed in the new window is similar to the following.
Note The GUIDs are different in every environment.
<?xml version="1.0" encoding="utf-8" ?>
- <BusinessEntityCollection xmlns="http://schemas.microsoft.com/crm/2006/WebServices">
- <entitymaps entity="EntityMap" morerecords="0" paging-cookie="" version="3.0">
- <entitymap>
<entitymapid>{1C4EC80A-AE71-DA11-AAAA-000D56C2E08A}</entitymapid>
<sourceentityname>opportunityproduct</sourceentityname>
<targetentityname>quotedetail</targetentityname>
</entitymap>
- <entitymap>
<entitymapid>{B04EC80A-AE71-DA11-AAAA-000D56C2E08A}</entitymapid>
<sourceentityname>opportunityproduct</sourceentityname>
<targetentityname>salesorderdetail</targetentityname>
</entitymap>
- <entitymap>
<entitymapid>{F54EC80A-AE71-DA11-AAAA-000D56C2E08A}</entitymapid>
<sourceentityname>opportunityproduct</sourceentityname>
<targetentityname>invoicedetail</targetentityname>
</entitymap>
</entitymaps>
</BusinessEntityCollection>
- Start another instance of Internet Explorer, and then type the following URL in the Address box:
http://localhost/Tools/SystemCustomization/Relationships/Mappings/mappingList.aspx?mappingId=
- Paste the GUID that you copied in step 5 after the equal sign of the URL in the Address box. The Address box now contains text that is similar to the following:
http://localhost/Tools/SystemCustomization/Relationships/Mappings/mappingList.aspx?mappingId={1C4EC80A-AE71-DA11-AAAA-000D56C2E08A}
Note You may have to add a colon (:) and a port number after localhost if a Microsoft Dynamics CRM 3.0 Web site is not on port 80. - When you press ENTER to locate the URL, the mapping page for the source and target entity opens. When you click New, a new page opens where you can confirm the mapping that you are editing.
To quickly access a mapping, add a shortcut to the desktop, or add the URL to a favorites list in Internet Explorer.
To do this in Microsoft Dynamics 4.0, follow these steps:
- Start SQL Server Management Studio on the computer that is running SQL Server hosting CRM databases.
- Press New Query and execute the following query against the organization database which mappings you want to manage:
select SourceEntityName, TargetEntityName, EntityMapId
from EntityMapBase
where SourceEntityName in ('opportunityproduct', 'quotedetail', 'salesorderdetail') and TargetEntityName in ('quotedetail', 'salesorderdetail', 'invoicedetail');
The result of the query should look similar to the following:
SourceEntityName TargetEntityName EntityMapId
--------------------- ------------------ ------------------------------------
salesorderdetail invoicedetail B63D75D0-C4BE-DC11-992B-0003FF51E5C4
quotedetail salesorderdetail 553E75D0-C4BE-DC11-992B-0003FF51E5C4
opportunityproduct quotedetail 2E3F75D0-C4BE-DC11-992B-0003FF51E5C4
opportunityproduct salesorderdetail DF3F75D0-C4BE-DC11-992B-0003FF51E5C4
opportunityproduct invoicedetail 314075D0-C4BE-DC11-992B-0003FF51E5C4
The following are the schema names of the entities that are involved:
- The schema name for the Order Product entity is salesorderdetail.
- The schema name for the Invoice Product entity is invoicedetail.
- The schema name for the Opportunity Product entity is opportunityproduct.
- The schema name for Quote Product entity is quotedetail.
Note The EnitityMapId GUIDs are different in every environment.
- Copy the EntityMapId GUID of the mapping set that you want to modify to the clipboard.
- Start Internet Explorer, Type the following URL in the Address box:
http://crmserver:port/organization/Tools/SystemCustomization/Relationships/Mappings/mappingList.aspx?mappingId=
Replace the crmserver, port, and organization accordingly to match your environment.
- Paste the GUID that you copied in step 3 after the equal sign of the URL in the Address box and enclose it in braces. The Address box should now contain text that resembles the following:
http://crm:5555/Contoso/Tools/SystemCustomization/Relationships/Mappings/mappingList.aspx?mappingId={B63D75D0-C4BE-DC11-992B-0003FF51E5C4}
- When you press ENTER to open the URL, the mapping page for the source and target entity opens. When you click New, a new page opens where you can confirm the mapping that you are editing.