Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

orgcontext.AddLink

$
0
0

I have a queue which contains cases.

I select a Case and I run a Workflow Entity on the selected Case and the workflow creates a Contact for the selected Case in the Citizen Entity.

I want to add a link between the contact I just created by running the workflow on the selected Case in the queue and the selected Case.

I am using the below code but I'm unsure what to put in for the first variable.

Anyone any ideas?

 var thenewcontact = new Contact()
                    {                        
                        FirstName = firstName,
                        LastName = lastName,
                        MobilePhone = input,
                        EMailAddress1 = email,                        
                        Id = new Guid()
                    };
                    orgcontext.AddObject(thenewcontact);
                    orgcontext.AddLink(???, new Relationship("incident_customer_contacts"), thenewcontact);                    
                    orgcontext.SaveChanges();


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>