Tuesday, March 5, 2013

Import CRM 2011 Solution Dependency Error for a Workflow

I have a workflow that creates a Case from an Opportunity. It maps fields like the title and price list and spits out a case, simple and tested in my development org. However, when I exported the unmanaged solution it resides in as managed and import that into a blank org, this error occurred:

The dependent component Attribute (Id=parentaccountid) does not exist.  Failure trying to associate it with Workflow (Id=13e950d4-8e77-e211-b5f0-080027cd26e8) as a dependency. Missing dependency lookup type = AttributeNameLookup.

Despite having the dependency (parentaccountid is a system field on the Opportunity Product entity!) in the target org. So right off the bat I know this is going to be a weird one. How can I not have a stock system field?

My own analysis looking into the XML for the workflow found one node with reference to parentaccountid for preferredserviceid. (perferredserviceid is a system field on the account). However, the workflow did not contain a reference to that preferredserviceid field! How odd. Its like CRM remembered at one point that it did have a reference to it and never removed it. That "memory" caused it to output the field as a dependency in the workflow XML but not in one of the workflow steps itself. How odd.

I attempted deleting the whole workflow and re-add it to see if that node exported in the new workflow and it did not. After deleting and painfully copying each detail from the original workflow into a new one the error was gone. Hope that helps someone else in this situation.

No comments:

Post a Comment