Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Delegate workflow by code

(3) ShareShare
ReportReport
Posted on by 56
Hi,
 
My requirement is to delegate a workflow to another user by code. for this i am using this code
 
select * from workflowWorkitemTableLocal
    where workflowWorkitemTableLocal.CorrelationId == this.CorrelationId;
 
workflowWorkitem::delegateWorkItem(workflowWorkitemTableLocal.id, this.UserId, this.comments);
 
but it gives me an error
Infolog: Error: SysWorkflowWorkItem-delegate\tCannot delegate to '{B7038B3A-4584-48A1-8A22-AED72276BF58}' because this user is already assigned to a work item for this workflow step.
 
 
Categories:
  • Waed Ayyad Profile Picture
    Waed Ayyad 6,585 Super User 2024 Season 2 on at
    Delegate workflow by code

    Hi, 

    Is your issue resolved? If yes, mark the answers that helped you as verified. 

    Thanks,

    Waed Ayyad

  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,585 Super User 2024 Season 2 on at
    Delegate workflow by code
    Hi,
     
    Based on the error you are trying to delegate the workflow to the same user who is on the work Item (You delegate the workflow to same user).
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans