Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Help Needed. Error Importing Unmanaged Solution: The dependent component Workflow does not exist

(0) ShareShare
ReportReport
Posted on by 365

I have been stuck on this for some time now and I am not sure what has happened. Any help in resolving it would be appreciated.

When Importing a unmanaged solution from dev to uat I get the below error.

The dependent component Workflow (Id=0f1db187-49fb-48e7-9532-3cf4c9ffe3f2) does not exist.  Failure trying to associate it with Workflow (Id=fd8af54e-2ac4-4113-b0a8-70eaaebc71ce) as a dependency. Missing dependency lookup type = PrimaryKeyLookup.

The solution currently does not include the SLA Based on Case Subject, or any SLA's so I do not know why this error is occurring when Importing the solution. In an attempt to resolve this issue I did remove an SLA with a different name.

2185.Solution.png

When I run the c# console code below in dev and uat I find the name of Workflow 2 is SLA Based on Case Subject, and workflow 1 is null.

var wf1 = (from s in _context.WorkflowSet
where s.WorkflowId.Value == new Guid("0f1db187-49fb-48e7-9532-3cf4c9ffe3f2")
select s).Single();

var wf2 = (from s in _context.WorkflowSet
where s.WorkflowId.Value == new Guid("fd8af54e-2ac4-4113-b0a8-70eaaebc71ce")
select s).Single();

the SLA Based on Case Subject can be found in the processes advanced find. When I look into the workflow I find a start child workflow step that references a workflow that no longer exists

5810.process.png

The SLA must have been deleted because it is not displayed in Settings->Service Management->Service Level Agreements

SLAs.png

*This post is locked for comments

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 Moderator on at
    RE: Help Needed. Error Importing Unmanaged Solution: The dependent component Workflow does not exist

    Hi ,

    This is coming as because you have used some lookup value in your workflow , but the lookup value does not exists in you target environment. So when you are trying to import the workflow trying to find the lookup value reference in the target environment and its could not found.

    So in that case you may removed the lookup value condition from workflow and use an alternative condition.

    Otherwise you need to migrate the lookup entity data with  GUID using configuration migration tool to your target environment.

    Hope this helps.

  • RE: Help Needed. Error Importing Unmanaged Solution: The dependent component Workflow does not exist

    We came across this same issue and were able to resolve as follows

    Dynamics CRM 2016 On Prem v 8.2 with update 2.2

    Steps to replicate:

    • Delete an existing SLA item
    • Publish and export managed solution (ensuring the SLA is part of the solution)
    • Import the solution into another environment
    • Get the error:
    • The dependent component Workflow (Id={Guid 1}) does not exist.  Failure trying to associate it with Workflow (Id={Guid 2}) as a dependency

    What appears to be happening

    • Deleting a SLA item appears to delete the underlying workflow associated under the covers but doesn't properly remove references to the deleted workflow in the solution.
    • Guid 2 above represents the workflow associated with the SLA itself
    • Guid 1 represents the workflow associated with the deleted SLA item
    • CRM appears to completely delete the workflow from the CRM database when an SLA item is deleted the UI
    • The following query confirms this and reveals no records returned.

    SELECT WorkflowId,Name  FROM [dbo].[WorkflowBase] where workflowid='Guid 1'

    • When importing the solution, it is trying to make a reference to a workflow that doesn't exist
    • Ensuring that the solution also doesn't have a reference to the deleted workflow ought to resolve the issue

    CRM does a lot of smoke and mirrors with workflows under the covers when SLAs are created and modified. It appears on the surface to be a bug with how deletions of SLA items are handled in CRM.

    Steps to resolve

    (disclaimer: this involves editing the solution file and isn't supported.  Only do this if you know what you're doing, not into a production environment etc)

    • Unzip the managed solution file to the file system
    • Open the workflows folder
    • Look for files that have a name beginning with the name of the SLA in question  (in our case, "Default SLA") and ending with the guid of the workflow representing the SLA (Guid 2)
    • Note that there may be more than 1 XAML file matching this name but with different Guids
    • Search for Guid 1 in the matching file found above
    • If Guid 1 IS found in the file, make a note of the full filename of the XAML file
    • Open the customizations xml file and search for the above noted file name
    • Find the <Workflow ></Workflow> node that contains the node <XamlFileName>{file name noted above}</XamlFileName>
    • Remove that Workflow node completely and cleanly from the Xml
    • Save the customizations.xml file
    • Remove the .XAML file from the Workflows folder as noted above
    • Create a zip of the modified solution
    • Re-import the modified managed solution into the target environment, this time without references to non-existent workflows

    Happy to find whether there are other ways around this

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans