I have a custom "Product List Template" Entity with an N:N relationship to products, I want to give the users a button to copy the products from an Opportunity onto a new "Product List Template".
I can retrieve the list of Products from the Opportunity and create the custom Entity easily enough, but I cannot see how to add the products to that record once it is created. I don't want to create a new product but there doesn't seem to be an action for "Create a Relationship" or anything similar.
How can I associate existing products with an existing Entity in Dynamics 365?
According to your description, I assume that you could use the action “List records” to get the existing products.
As the “Product list template” entity with a relationship to products, I assume that they should have common data in both two entities, such as a name or Id. Then you could add a Condition in the flow to check if the two entities have the same name or Id. If yes, create the record in the existing product.
Please try it on your side and feel free reply if you need more help.
Yes i'm not having a problem retreiving the list of products from the opportunity as they have an N:1 relationship, so there is a field on the product that points to the opportunity.
That works for a 1:N relationship, but not for an N:N there has to be some sort of intermediate table that associates one record with another. When using the SDK, you create an EntityReference to associate items on an N:N relationship, I don't see how to create this using flow.