I have created a custom workflow activity in CRM that creates a task. The workflow is attached to an a opportunity. When I create my task I would like to set the “regardingobjectid” to the guid of the related opportunity.
ICrmService crmService = context.CreateCrmService();
task entity = new task();
entity.subject = taskSubject;
entity.regardingobjectid.Value = ??????
crmService.Create(entity);
Is this possible? I thought it would be simple.