Problem: Suppose you have a CRM workflow but at certain condition you want to execute it by code.
You will just need to get the Workflow ID and then you use the below code:
-How to get Workflow ID ?
1. Go to settings => Processes
3. Select its ID from the URL as the screenshot describe.
//Create the request
ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
WorkflowId = “Workf Guid”,
EntityId = “The Guid of the record on-which you would like to execute the workflow”
// Execute the workflow.
ExecuteWorkflowResponse response =