Hi,
Does anyone know if it is possible to trigger a CRM workflow via an external event. E.G. File on sever is updated, or a record added to a SQL table?
Thanks
*This post is locked for comments
I suggest you to use supported methods for data adding/updating/deleting in Microsoft CRM. In this way you can create workflows or plugins which will trigger on events in system.
You can run a wf with Javascript. On this article you can find it : http://www.cub-e.net/post/Use-JavaScript-executecalllaunch-Dynamics-CRM-40-Workflow.aspx
Also you can try this method without javascript:
[C#]// Set up the CRM Service.CrmAuthenticationToken token = new CrmAuthenticationToken();// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.token.AuthenticationType = 0; token.OrganizationName = "AdventureWorksCycle";CrmService service = new CrmService();service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";service.CrmAuthenticationTokenValue = token;service.Credentials = System.Net.CredentialCache.DefaultCredentials;// Create an ExecuteWorkflow request.ExecuteWorkflowRequest request = new ExecuteWorkflowRequest();//Assign the ID of the workflow you want to execute to the request. request.WorkflowId = new Guid("b050f053-6968-dc11-bb3a-0003ffbad37a");//Assign the ID of the entity to execute the workflow on to the request.request.EntityId = new Guid("1DCDEE97-35BB-44BE-8353-58BC36592656");// Execute the workflow.ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)service.Execute(request);
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
UllrSki 2
ED-30091530-0 1