简体   繁体   English

在Dynamics CRM上使用工作流触发JScript Web资源

[英]Trigger a JScript webresource with a workflow on Dynamics CRM

I have a request to if a case on CRM is created between 00:00 to 17:45 and not on weekends, to assign the case to a specific user. 我要求是否在00:00到17:45之间(而不是在周末之间)创建CRM上的案例,以将该案例分配给特定用户。

I'm facing an issue that I can not trigger the Jscrip web resource to check the time, once the JS web resources only trigger onload or onsave the form. 我面临的一个问题是,一旦JS Web资源仅触发onload或onsave表单,我就无法触发Jscrip Web资源来检查时间。

Does anyone know how can I trigger that Js without having to open the case or when the case is created? 有谁知道如何在不打开案例或创建案例的情况下触发Js?

Thanks 谢谢

There is no way to run JS from Workflow. 无法从Workflow运行JS。 The only solution for you is to implement the same functionality as your webresource has using WF/Custom Workflow Actions. 唯一的解决方案是使用WF /自定义工作流操作来实现与Web资源相同的功能。

I would comment on Andrii's post but I cannot just yet. 我会评论安德里(Andrii)的帖子,但我还不能。 I agree with Andrii answer, you cannot fire JavaSript without having the form open, the two next solutions would create a plugin or a custom workflow action. 我同意Andrii的回答,您必须先打开表单才能启动JavaSript,接下来的两个解决方案将创建插件或自定义工作流程操作。

By passing in the date created to your code, you can parse the date and find out what day of the week it is by following this article https://msdn.microsoft.com/en-us/library/bb762911%28v=vs.110%29.aspx 通过将创建的日期传递给您的代码,您可以通过遵循本文https://msdn.microsoft.com/zh-cn/library/bb762911%28v=vs来解析日期并找出星期几。 0.110%29.aspx

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM