web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Run JS web Resource after every 3 hours

(0) ShareShare
ReportReport
Posted on by

Hi:
I have a JS web Resource, that uses some conditions and making changes in Leads,

My functionality is working well when I use a button click to trigger the function in JS Web Resource.

I want to run this functionality in backgroud.

How can I resolve this issue? I want to get rid of need of button.

I want to run this functionality after every 3 hours.

if I use workflow, I should run it before loading page of All Leads.

How can I do this thing?

Thanks.

*This post is locked for comments

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    Unfortunately since javascript runs client side you can't have it run in the background all the time. You would need to convert your logic to a workflow assembly and have the workflow call itself after three hours (check out www.powerobjects.com/.../create-recursive-or-scheduled-workflows-in-crm for more details).

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can't run your js in a way you want. You will have to develop everything using server-side approach. For example - on-demand workflow and some scheduler that will trigger mentioned workflow every 3 hours.

  • Community Member Profile Picture
    on at

    Thanks for your suggestion.

    I want to clear one more thing, as we can load a js web resource on form load, then may be it works.

    But is there a way that I can load JS Web resource instead of form?

    I want to load web resource when I browse All Leads page?

    Thanks

  • Community Member Profile Picture
    on at

    Can I use my JS Web Resource as User logins and DashBorad page opens?

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    I don't think there's a supported way to have JS run from a dashboard view. I guess you could add a new web resource page with your JS on it and add that as a navigation item in the main ribbon, then set that as the default page people get when they log it.

    Thanks,

     Aiden

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans