How can I change the status for the workflow from draft to publish?

How can I change the status for the workflow from draft to publish?

This question is not answered

Hi, I have to migrate an application from CRM 3.0 to CRM 11 and I have a problem with the workflow that I migrated previously.  I need to execute this:                                                         ExecuteWorkflowRequest rq = new ExecuteWorkflowRequest();            rq.WorkflowId = new Guid(idprocesoventa);                              rq.EntityId = new Guid(idoportunidad);                                     ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)servicio.Execute(rq);

But when I execute this I get the following error message "Workflow must be in Published State." In the site CRM of our organization I can't see the publish button for workflow. I only see Activate/Deactivate button.  I read from internet that the field "type" has the status 1= Publish and 2= Draft and my workflow always has the value 0f 2.  Even when I set to Activate it.  I found out another way to resolve it with the message PublishAllXmlRequest but it gets me empty results.  I think, I forgot to write something but I don't know what. It could be the CreateRequest message?

PublishAllXmlRequest

 

 

publishRequest = new PublishAllXmlRequest(); PublishAllXmlResponse publishresponse = (PublishAllXmlResponse)_serviceProxy.Execute(publishRequest);

ExecuteWorkflowRequest rq = new ExecuteWorkflowRequest();            rq.WorkflowId = new Guid(idprocesoventa);                              rq.EntityId = new Guid(idoportunidad);                                     ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)servicio.Execute(rq);

Do I forget something? Thanks

All Replies