Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Run JS web Resource after every 3 hours

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

  • Suggested answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,694 on at
    RE: Run JS web Resource after every 3 hours

    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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Run JS web Resource after every 3 hours

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Run JS web Resource after every 3 hours

    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

  • Verified answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: Run JS web Resource after every 3 hours

    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.

  • Verified answer
    Aiden Kaskela Profile Picture
    Aiden Kaskela 19,694 on at
    RE: Run JS web Resource after every 3 hours

    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

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans