
I'm creating connection roles via C# as follows:
// Create a Connection Role for contact
ConnectionRole newCR_Patient = new ConnectionRole
{
Name = "Patient",
Category = new OptionSetValue(Categories.Business)
};
_CRId_Patient = _serviceProxy.Create(newCR_Patient);
Console.WriteLine(" Created {0}.", newCR_Patient.Name);
// Create a related Connection Role Object Type Code record for Contact
createCRObject_Contact(_serviceProxy, _CRId_Patient);
Is there a way to associate the connection role to a solution? When I execute this code, the connection role is being created in the main customization of my project. I'd like to create this role in a specific solution - similar to how an entity can be created within a Solution. Any help, much appreciated.
Thanks!
*This post is locked for comments
I have the same question (0)I figured it out. I had to use a CreateRequest method. One of the parameters added to the CreateRequest is the SolutionUniqueName.
// Create a Connection Role for contact
ConnectionRole newCR_Patient = new ConnectionRole
{
Name = "Patient",
Category = new OptionSetValue(Categories.Business)
};
// Create Request for role creation
CreateRequest cr = new CreateRequest
{
Target = newCR_Patient
};
cr.Parameters.Add("SolutionUniqueName", _SolutionName);
CreateResponse cresp = (CreateResponse)_serviceProxy.Execute(cr);