web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Trigger Workflow from an external source

(0) ShareShare
ReportReport
Posted on by 55

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 have the same question (0)
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at
    Re: Trigger Workflow from an external source

     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.

  • Baris KANLICA Profile Picture
    User Group Leader on at
    Re: Trigger Workflow from an external source

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans