How can I create Bussiness Process flow with code. I can create workflow(ondemand/realtime ) with Xaml and below code.
Category = new OptionSetValue((int)WorkflowCategory.Workflow),
PrimaryEntity = Opportunity.EntityLogicalName,
Mode = new OptionSetValue((int)WorkflowMode.Background),
// Additional settings from the second New Process form.
Description = @"When an opportunity is created, this workflow" +
" sets the closeprobability field of the opportunity record to 40%.",
OnDemand = false,
Subprocess = false,
Scope = new OptionSetValue((int)WorkflowScope.User),
TriggerOnCreate = true,
AsyncAutoDelete = true,
Xaml = xamlWF,
I changed category as new OptionSetValue((int)WorkflowCategory.BusinessProcessFlow) but no luck struck with an error
Message: An unexpected error occurred.
Any help is very appreciated.
Thanks in advance!!
*This post is locked for comments