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)

How to add records to related entity in workflow

(0) ShareShare
ReportReport
Posted on by 12

Dear reader,

ever had that feeling that your quest is a common one, but you just don't see where to find the solution?

We have entity projects. Related (n:n) to projects are systemusers.
Whenever a new systemuser is created, I need to be sure that it's added to 4 or 5 specific projects. Since this is very important, we can't rely on manual action. So there I was, looking for a workflow solution.
Without any doubt this question has been answered a thousand times, but to google without the right keywords is like searching in the dark with a magnifying glass.

Any ideas?

thanks in advance
(sorry in advance ;) )

Jeroen

*This post is locked for comments

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

    Hi Jeroen,

    to deal with N:N relations you need to use a custom workflow or plugin.

    Within a plugin is not hard to reach your goal.

    Please le me know if i can help you.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Jeroen J Profile Picture
    12 on at

    Okay, thanks for your quick (!) response.

    But what if I manage to get things simpler. What if I just need to add the new systemuser to one single project? Could that be done using workflow?

  • khoait Profile Picture
    450 on at

    Yes, you can add the new systemuser to one single project using workflow with the help from a custom workflow activity. You may need to create a custom workflow activity which takes a project as an EntityReference input parameter, may be a user as an EntityReference input parameter if you want to use the custom workflow elsewhere other than the workflow on User; and perform Association between the project and the user.

    Or you can use available workflow tools from msdyncrmworkflowtools.codeplex.com which already implement a custom workflow activity called "Associate" to associate N:N relationship records.

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

    Hi Jeroen,

    When you create N:N relationship between entities, it creates an internal system entity to store the references for both the entities involved. This internal entity is not accessible in workflows. You won't be able to create record. As suggested above, this can be achieved by custom code (Plugins & workflows).

    The other alternate is to create you own custom/ manual N:N entity by creating an entity with the fields from both the entities. As this is the normal entity, you can easily create records for this using workflow.

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