Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Deactivate workflow by SDK - Error - Only workflow definition or workflow template can be unpublished.

$
0
0

Hello Techies,

I'm trying to deactivate a workflow using the following code

var activateRequest = newSetStateRequest

{

EntityMoniker = newEntityReference

("workflow", item.Id),

State = newOptionSetValue(0),//Draft = 0 Published = 1

Status = newOptionSetValue(1)//Draft = 1 Published = 2ss

};

proxy.Execute(activateRequest);

And i get the errior "Only workflow definition or workflow template can be unpublished."

Thanks & Regards,
Clement


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images