Symptoms

After you customized the Campaign Activity StatusCode field, the distribution of the Campaign Activities fails.

You get the following message when clicking the Distribute Campaign Activity button:

The Campaign Activity can be distributed only once."

This issue happens when you removed some of the values from Campaign Activity StatusCode field.

Cause

Distribute Campaign Activity operation needs certain values for StatusCode to be executed. Even though it is possible to remove values from customization, please do not remove them.

Resolution

Once you removed the value, you are not able to add them back manually in CRM. Please do not remove the values from the StatusCode field.

If you have removed some of the values please follow these steps to get them back.

Step 1. Export the Default Solution. Click Settings, click Customizations and click Customize the System. Click on Export Solution.
Note: You can also add the Campaign Activity to a new solution and just export that solution. Extract the contents of the solution zip file.

Step 2. Open the customizations.xml in an xml editor like notepad or Visual Studio, locate the following node

<Name LocalizedName="Campaign Activity" OriginalName="Campaign Activity">CampaignActivity</Name>
<ObjectTypeCode>4402</ObjectTypeCode>
<EntityInfo>

Step 3: Within this node, locate the following section. It will probably have a variation of the following where some status labels are missing.

<statuses>
<status value="1" state="0">
<labels>
<label description="Proposed" languagecode="1033" />
</labels>
</status>
<status value="6" state="0">
<labels>
<label description="Completed" languagecode="1033" />
</labels>
</status>
<status value="2" state="1">
<labels>
<label description="Closed" languagecode="1033" />
</labels>
</status>
<status value="3" state="2">
<labels>
<label description="Canceled" languagecode="1033" />
</labels>
</status>
</statuses>

Step 4: You will need to add back the missing statuses (see below for a list of the default status you need to have. 
Note: You can add new values in CRM but these default ones also need to be there.

<statuses>
<status value="1" state="0">
<labels>
<label description="Proposed" languagecode="1033" />
</labels>
</status>
<status value="0" state="0">
<labels>
<label description="In Progress" languagecode="1033" />
</labels>
</status>
<status value="4" state="0">
<labels>
<label description="Pending" languagecode="1033" />
</labels>
</status>
<status value="5" state="0">
<labels>
<label description="System Aborted" languagecode="1033" />
</labels>
</status>
<status value="6" state="0">
<labels>
<label description="Completed" languagecode="1033" />
</labels>
</status>
<status value="2" state="1">
<labels>
<label description="Closed" languagecode="1033" />
</labels>
</status>

Step 5: Save the modified customizations.xml. Then select the customization.xml file and any other files that where extracted with the solution
so they are all highlighted, then right click and choose Send to and select Compressed (zipped) folder.

Note: The files need to be at the root of the zip file and not within a directory folder.

Step 6: Within CRM click Settings and click Solutions. Click Import and select the new zip file created in Step 5 that contains the modified customizations.xml.

Step 7: Click Publish All Customizations once the import completes.

More Information

When customizing the Campaign Activity entity, if you try to delete an option set value for the Status Reason you will see the following message:

Existing records and customizations might reference this option value.  Those references will not be updated if this option value is deleted.  Do you want to continue?

If you continue and delete the Option Set value, you will run into this issue.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×