Use source codes to establish relationships between entities


Updated: November 1, 2016

Applies To: Dynamics Marketing


Microsoft Dynamics Marketing is scheduled to be retired on May 15, 2018. After that date the service will no longer be available. Please plan accordingly. For details, see the blog post Microsoft Dynamics Marketing service will be discontinued, and learn what’s coming next.

The source code feature provides a centralized table of shared codes, which you can assign consistently across related records. Use this feature to establish a relationship between entities, which can be useful when sorting and filtering lists, and for generating queries against the database for custom reports built with OData feeds. The functionality is somewhat similar to applying tags to blog posts or browser bookmarks. The following types of entities can be associated with a source code:

  • Email marketing messages

  • Results

  • Advertisements

  • Media-expense items

  • Media-order items

  • Leads

  • Lead-scoring models

  • Landing pages

You can choose any value you like for each source code. Often you will choose it based on an internal project name, campaign nickname, or an ID that matches a value from an external database. The system is very flexible, so you should be able to adapt it for your needs.

To work with source code, you must have Edit/View Source Codes privileges. More information: Work with user accounts and staff contacts.

To work with source code, go to Settings > Campaign Management > Source Codes. This brings you to the Source Codes list page, which provides many of the standard controls for searching, sorting, filtering, adding, removing and viewing items in the list, plus other common features. For details about how to use these common controls, see Learn how to work and get around in Microsoft Dynamics Marketing.

Whenever you create or edit a source code, the settings listed in the following table are provided.




Select this check box to activate the current record; clear it to deactivate the record. Active records are always shown on the list page and are also available for use in other parts of Dynamics Marketing. Inactive records are usually hidden in the list view and aren’t available elsewhere. When you delete a record on the list page, it’s not actually deleted, just set to inactive. On the list page, you can toggle to show or hide inactive records in the list.

Source Code

Enter your source code identifier here. This value identifies the record in list views, drop-down lists, and other areas of Dynamics Marketing. Choose a value that all users will recognize.


Enter the name of the company that the current record belongs to. The company must already exist in the database; type-ahead assistance is provided (or enter “%%” as a wildcard to scroll through all companies). The current record is only available for use with other relevant entities that are also associated with this same company. For example, a marketing message associated with the company Woodgrove Bank can only be sent to contacts belonging to Woodgrove Bank and included in campaigns associated with Woodgrove Bank.


If relevant, enter a division of your selected company to associate with the current record (you must select a Company first). The division must already exist in the database. Type-ahead assistance is provided (or enter “%%” as a wildcard to scroll through all divisions). In some (but not all) cases, the current record is only available for use with other relevant entities that are also associated with this same division. See also: Set up divisions and departments to reflect your organization.


Enter a description of the source code so that you and other users will know what it’s for.

Start Date and End Date

Specify the date range during which the current record can be used. You can enter values directly or use the convenient calendar and clock buttons to select valid values from a calendar or time selector.

Created By

Shows the name of the contact that created the current record. This is automatically set to match the current user when the record is created, but you can also change it. The specified contact must already exist in the database; type-ahead assistance is provided (or enter “%%” as a wildcard to scroll through all contacts). This setting can affect which users are able to see and edit the current record, depending on the users’ security settings and team memberships. More information: Work with user accounts and staff contacts and Define and manage teams.


Use this drop-down list to apply a category to the current record. Categories can be useful to help identify the item and for sorting and filtering lists. Your site administrator can customize the values available here to ensure that they match the needs of your organization. See Create custom drop-down values and folders for details about how to customize drop-down values.


Enter any relevant details about how and when the source code should be used.

After you have saved your record at least once, you’ll see related-information tabs below the dotted line. Use the drop-down list at the top of this area to change the tab. Each tab shows a specific type of information that’s related to your current record. Usually the tabs are views into other areas of the site (such as jobs, invoices, or leads) and work the same way here as they do on the main list and maintenance pages for the relevant features, except that here they are filtered to only show records that are related to the current record.

The available related-information tabs are summarized in the following table.




If you require approval before an item can be used, use this tab to create and monitor an approval workflow. More information: Manage review and approval routing.


Use this tab to send and view emails related to the current record. Note that only mails sent using this tab will be shown here; any replies will go to your standard inbox and won’t appear in Dynamics Marketing. More information: Manage emails.


Use this tab to view all leads that are linked to the current record, and to create new leads that use it. More information: Manage leads.


Shows log entries related to the current record. These are auto generated and can’t be edited here, just viewed.


Use this tab to add, view, and reply to notes related to the current record. More information: Notes.


Use this tab to view all marketing results that are linked to the current record, and to create new results that are related to it. More information: Marketing performance measurement results.