Hello,
I need to call external service on task complete event in CRM.
How could I achieve this.
*This post is locked for comments
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.
Hello Rawish,
Thank you for quick response.
but, I want to track an event from java script.
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.
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