Announcements
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
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.
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.
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?
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
André Arnaud de Cal...
294,118
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator