Answered by:
CRM 2011 : How to call plugin / workflow from ODATA and json JavaScript in ribbon custom button??

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
- Edited by Ashish Sharma Engg Wednesday, March 21, 2012 11:56 AM
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
- Edited by Amreek Singh Wednesday, March 21, 2012 1:54 PM
- Proposed as answer by Amreek Singh Wednesday, March 21, 2012 1:54 PM
- Unproposed as answer by Ashish Sharma Engg Wednesday, March 21, 2012 3:00 PM
- Marked as answer by Ashish Sharma Engg Wednesday, March 21, 2012 5:40 PM
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
- Proposed as answer by Amreek Singh Wednesday, March 21, 2012 1:27 PM
- Unproposed as answer by Ashish Sharma Engg Wednesday, March 21, 2012 3:00 PM
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
- Edited by Ashish Sharma Engg Wednesday, March 21, 2012 1:48 PM
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
- Edited by Amreek Singh Wednesday, March 21, 2012 1:54 PM
- Proposed as answer by Amreek Singh Wednesday, March 21, 2012 1:54 PM
- Unproposed as answer by Ashish Sharma Engg Wednesday, March 21, 2012 3:00 PM
- Marked as answer by Ashish Sharma Engg Wednesday, March 21, 2012 5:40 PM
Wednesday, March 21, 2012 1:52 PM -
Thanks for this guide Singh.....
Ashish
Wednesday, March 21, 2012 5:41 PM