locked
CRM 2011 : How to call plugin / workflow from ODATA and json JavaScript in ribbon custom button?? RRS feed

  • Question

  • CRM 2011 :  How to call email plugin / workflow from

    if (emailvalidated == "Yes")

    {// call email plugin / workflow}  using ODATA and json JavaScript

    in ribbon custom button??


    Ashish


    Wednesday, March 21, 2012 10:43 AM

Answers

  • Not possible. Rest or Odata just support CRUD(create , read, update, delete) operations or  may be associate/ dissociate.

    No other calls are possible using odata.

    It's just a subset.

    Other option is to update an entity/ or create an entity using odata which in turns trigger your plugin or workflow for that entity.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com


    Wednesday, March 21, 2012 1:52 PM

All replies

  • To execute a plugin/workflow you need to trigger an event. If your odata is performing a crud operation on the entity, the event will trigger.

    If you are trying to start a plugin\ workflow with out crud operation, you need to use soap call.

    Here is sample on how to start a workflow in javascript

    http://anujgovilmscrm.blogspot.com.au/2011/07/executing-workflow-using-javascript-in.html

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    Wednesday, March 21, 2012 1:27 PM
  • Thanks Amreek, but offline system i need to use odata and json javascript and from that i need to call email plugin? i am looking  odata and json javascript to calling email plugin

    and in plugin call email template..


    Ashish




    Wednesday, March 21, 2012 1:42 PM
  • Not possible. Rest or Odata just support CRUD(create , read, update, delete) operations or  may be associate/ dissociate.

    No other calls are possible using odata.

    It's just a subset.

    Other option is to update an entity/ or create an entity using odata which in turns trigger your plugin or workflow for that entity.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com


    Wednesday, March 21, 2012 1:52 PM
  • Thanks for this guide Singh.....

    Ashish

    Wednesday, March 21, 2012 5:41 PM