Hi All,
I am creating a record inside a custom entity through C# code and then i want to access the similar newly created record by fetching its id.I want to set that particular record to inactive state ..But its not working..I used the below lines of code -:
Id = service.Create(entity_name);
Console.WriteLine("Record Created ");
Entity contact_unsubscribe = new Entity("custom entity");
contact_unsubscribe = service.Retrieve("new_contact_unsubscribe", Id, new ColumnSet(true));
contact_unsubscribe["statecode"] = new OptionSetValue(1);
service.Update(contact_unsubscribe);
Any help please!
*This post is locked for comments
I have the same question (0)