Hi,
I'm using the following code to get a list of work flows. But I get
invalid results. I get some work flows which are repeated many times.
why is that ? This happens even when I deactivate the workflow.
//Fetch XML
ColumnSet columns = new ColumnSet();
columns.Attributes = new string[] { "name" ,"entitytype"};
QueryExpression query = new QueryExpression();
query.EntityName = EntityName.wfprocess.ToString();
query.ColumnSet = columns;
CrmService service = new CrmService();
service.Url = "http://<bla>:5555/mscrmservices/2006/crmservice.asmx";
service.Credentials =new
NetworkCredential("user","pwd","domain");
BusinessEntityCollection users =
service.RetrieveMultiple(query);
int i=0;
ddlWorkflows.Items.Clear();
foreach(wfprocess wfp in users.BusinessEntities)
{
string name = wfp.name;
string type = wfp.entitytype;
ddlWorkflows.Items.Insert(i,name +"-"+ type);
i++;
}
any ideas why i get one work flow multiple times? Is is possible to
query inactive work flows?
thanks in advance,
Hassan.
|