web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Sync workflow terminated with error 'systemuser With Id = 1901130da-..... Does Not Exist'

(0) ShareShare
ReportReport
Posted on by

Hello,

I'm encountering a strange problem. I have a workflow which triggers when an entity is created. It has the following steps.

Step 1: Update the lookup field to link to a record in the Autonumber entity.

Step 2: Set the record number field to the value of the Counter field in the Autonumber entity.

Step 3: Increment the counter field in the Autonumber entity with the value of the Increment By field in the same entity.

I use such workflows as a means of getting an Autonumber. This worked fine until I decided to import my unmanaged solution to another organisation. In this new organisation this workflow throws the following error on Step 1.

Sync workflow 'SP Electrical Autonumber' terminated with error 'systemuser With Id = 1901130da-..... Does Not Exist'

This is odd as I'm creating the entity so the workflow is set to run as the 'The user who made changes to the record' and I've got the System Administrator profile. Further my GUID is different to the above guid and my guid exists in the database. So I'm struggling to understand where its getting this guid from.

I've checked the Autonumber record in the first step using (Select * from Filteredcal_autonumber) and couldnt find the guid in the error message anywhere there too!

So where is it getting this guid and why is it that just this workflow is throwing this error. Other entities use similar workflows for their autonumbers and they seem to work fine. Any ideas? Or places to look would be much appreciated. I've investigated this myself a lot and only posting here as a last resort as I'm really out of ideas. 

My next step is to delete the entire workflow and recreate it again and see if this solves the issue. But I still want to know why I'm experiencing this. I'll post back on whether deleting and recreating the workflow solved the issue. 

PS. CRM 2013

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Update: I've just recreated the workflow and it hasnt changed a thing. I'm still getting the above error.

  • Community Member Profile Picture
    on at

    I've identified the guid to belong to the installer account from the previous organisation that I had imported the solution from. Not sure why the process is looking for this guid in the new organisation. Anyone?

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    It doesn't look like the problem in your auto number solution but the entity on which it is running. There is a possibility that the entity itself is throwing error on update/ create. Would suggest you to check this.

    Also, you can run the below query to check the user id-

    --------

    SELECT fullname

    FROM   systemuser

    WHERE  systemuserid = 'guid here'

    --------

    If you do not find the guid value in systemuser, it is likely that some how a reference is imported for this uer within some business rule or workflow.

    Hope this helps.

  • Suggested answer
    Rasmus R. Aardal Profile Picture
    on at

    Hello,

    Forgive me if I am oversimplifying here, but I would like to make sure that all the details I can think of are checked out.

    First off, I assume this is a real-time workflow to avoid conflicts with multiple autonumber workflows running at the same time? If so, it is not necessarily the workflow itself that references a non-existent value, it could be any kind of logic on the entity that triggers while the workflow is running. The workflow will throw an error that makes it seem like the WF itself is set up incorrectly.

    If it is a real-time workflow, could you try converting it to an async workflow just to eliminate the WF itself as a source to the error?

    Do any other workflows run on create of the record that is being numbered, or on change of the Autonumber record? If so, try deactivating them and create a new record. 

    Do you have any plugin code running on any of the two entities? If so, try disabling it for the purpose of testing.

    It seems to me like you are creating the records in the interface, not through the API. Do you have any JavaScript or business rules running on the entity in question that may reference the user with this GUID?

    Hope this helps!

    Regards,

    Rasmus

  • Suggested answer
    Community Member Profile Picture
    on at

    I think you have multiple plugins registered on the same event.

    Some other plugin is registered on Run As Specific user setting (the GUID that you are getting in error.) Try to disable other plugin or assign valid user to other plugin.

    This might solve your issue.

  • Suggested answer
    Community Member Profile Picture
    on at

    Ok so glad I got to the bottom of this. This is another CRM gotcha!!!

    The issue wasnt with the workflow at all. Inspite of deactivating the workflow I was still getting the error. On discussing with a work colleague we concluded that one possibility where a GUID from an older organisation might have been inserted was Visual Studio. The old organisation used custom plugins and they were held in Visual Studio. When I imported the solution to a new organisation, I continued to use Visual Studio to make changes to these plugins. I continued to deploy them to the new organisation. This made Visual Studio transfer the old guids to the new organisation.

    What I should have done is, in VS when you connect to a new organisation, you need to open the RegisterFile.crmregister file that you will find in the Deploy project and set any Id='[guid here]' to Id='000000-0000-0000-0000-000000000000' so that when you deploy new fresh GUIDs from the new organisation are created and stored.

    To fix my problem, I unregistered the plugins, then reset the IDs in the file as above and then redeployed the plugins! Voila! Everything works now!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans