Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The Campaign Activity Can Be Distributed Only Once Error Occurs After Deleting Campaign Activity StatusCode Field Values


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2501788
Revision : 1
Created on : 1/7/2017
Published on : 1/28/2011
Exists online : False
Views : 174