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)

How to listen ms crm Task Complete event.

(0) ShareShare
ReportReport
Posted on by

Hello,

I need to call external service on task complete event in CRM.

How could I achieve this.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: How to listen ms crm Task Complete event.

    Hi Sudeep,

    you have to write a plugin - You have to register 2 steps: SetState and SetStateDynamicEntity and then you will trigger your plug in on a status change.

    But beware: status change is only on Active or Inactive.

    If you only change the status reason you have to use Update Message and PostImage

    then you call the external service and pass on the object you need to external service as you normally do.

  • Community Member Profile Picture
    on at
    RE: How to listen ms crm Task Complete event.

    Hello Rawish,

    Thank you for quick response.

    but, I want to track an event from java script.

  • Suggested answer
    Emre GULCAN Profile Picture
    2,379 on at
    RE: How to listen ms crm Task Complete event.

    Hi,

    You can do this with client-side development (javascript). You should add a webresource and reference your Task entity.

    After that open your "form" design and form properties and attach javascript function to form save event, please don't forget "pass execution as parameter" checked.

    sample code is below, also please look at https://msdn.microsoft.com/en-us/library/gg509060.aspx#BKMK_GetSaveMode for other form and save modes.

    function onSave(executionContext) {
        var saveMode = executionContext.getEventArgs().getSaveMode();
        if (saveMode == 58) {
            alert("Save as Completed");
            //call your external webservice with AJAX call
        }
    }

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