none
N:M Relationship per Custom Workflow erstellen. RRS feed

  • Frage

  • Wie kann ich denn in einem Custom Workflow oder auch einem Plugin eine N:M Beziehung erstellen?

    Beide Zieldatensätze sind natürlich vorhanden.

    CRM 2011 mit SDK 5.0.3

    Danke,
    Reinhold

     


    Donnerstag, 28. April 2011 15:26

Antworten

  • Gelöst:

    // Create an AssociateEntities request

    AssociateEntitiesRequest request = new AssociateEntitiesRequest();

    // Set the ID of Moniker1 to the ID of the lead.request.

    Moniker1 = new Moniker();
    request.Moniker1.Id = new Guid("B050F053-6968-DC11-BB3A-0003FFBAD37A");

    request.Moniker1.Name = EntityName.lead.ToString();

    // Set the ID of Moniker2 to the ID of the contact.request.

    Moniker2 = new Moniker();
    request.Moniker2.Id = new Guid("1DCDEE97-35BB-44BE-8353-58BC36592656");
    request.Moniker2.Name = EntityName.contact.ToString();

    // Set the relationship name to associate on.
    request.RelationshipName = "contactleads_association";

    // Execute the request.

    service.Execute(request);

    • Als Antwort markiert RBecker Montag, 2. Mai 2011 07:51
    Montag, 2. Mai 2011 07:51