Answered by:
Trigger a script from a workflow.

Question
-
Hello. Can you tell me how can I trigger a script from a workflow? Thank you.Tuesday, April 9, 2013 1:49 PM
Answers
-
You can't - a workflow is running on the server while JavaScript runs on the client side. Your best bet would be to re-create the logic in the workflow itself or create a custom workflow activity if the functionality is beyond what the OOB workflow can accomplish.
Jason Lattimer
My Blog - Follow me on Twitter - LinkedIn- Proposed as answer by JLattimerMVP, Moderator Tuesday, April 9, 2013 1:52 PM
- Marked as answer by Payman BiukaghazadehEditor Thursday, April 11, 2013 4:03 PM
Tuesday, April 9, 2013 1:52 PMModerator -
Hi,
is not possible to trigger a script (javascript code defined inside onload,onsave or onchange events) from a workflow.
A workflow is executed server-side, the javascript is executed client-side.My blog: www.crmanswers.net
- Proposed as answer by Guido PreiteMVP Tuesday, April 9, 2013 1:53 PM
- Marked as answer by Payman BiukaghazadehEditor Thursday, April 11, 2013 4:03 PM
Tuesday, April 9, 2013 1:52 PM
All replies
-
You can't - a workflow is running on the server while JavaScript runs on the client side. Your best bet would be to re-create the logic in the workflow itself or create a custom workflow activity if the functionality is beyond what the OOB workflow can accomplish.
Jason Lattimer
My Blog - Follow me on Twitter - LinkedIn- Proposed as answer by JLattimerMVP, Moderator Tuesday, April 9, 2013 1:52 PM
- Marked as answer by Payman BiukaghazadehEditor Thursday, April 11, 2013 4:03 PM
Tuesday, April 9, 2013 1:52 PMModerator -
Hi,
is not possible to trigger a script (javascript code defined inside onload,onsave or onchange events) from a workflow.
A workflow is executed server-side, the javascript is executed client-side.My blog: www.crmanswers.net
- Proposed as answer by Guido PreiteMVP Tuesday, April 9, 2013 1:53 PM
- Marked as answer by Payman BiukaghazadehEditor Thursday, April 11, 2013 4:03 PM
Tuesday, April 9, 2013 1:52 PM -
Thanks for the quick response. Can you give an alternative of mapping from a workflow two fields with local option set, beside recreated them with a global option set?
My solution was to create a plug-in, but if you have any suggestion.....I would be vedry happy to find it out. Thank you.
The environment is CRM 2011 online.
Wednesday, April 10, 2013 11:26 AM -
Wednesday, April 10, 2013 11:37 AM
-
Thank you, but your links are not helping me.Wednesday, April 10, 2013 11:59 AM
-
Thank you, but your links are not helping me.
Both of the links are unrelated to the question. As Guido and Jason said, you could not do such action.
If the answer helped you, remember to mark it as answer.
My Weblog -- My Website -- My FacebookWednesday, April 10, 2013 12:06 PMModerator -
So besides the global option set, a plug-in could be helpful?
Thank you.
Wednesday, April 10, 2013 12:11 PM -
Hi,
Both link were clearly stated,As other (jlattimer,guido preite and payman )describes such action is not possible! For your reference only i added those links!!!
Sindu M
Wednesday, April 10, 2013 12:24 PM -
The easiest option would be to write a plugin or use a custom workflow activity to figure out the values and then map them through. The custom workflow activity would be the easiest to keep track of in the future (it'd be obvious it is running by looking at the workflow in CRM)
- Proposed as answer by Jamsul Friday, April 12, 2013 1:26 PM
Wednesday, April 10, 2013 2:16 PM -
Ok. Thank you for your response.Thursday, April 11, 2013 3:57 PM