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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Setting up JavaScript action onload of a page

(0) ShareShare
ReportReport
Posted on by

I am trying to set up a site-wide login function using JavaScript, I need this to load when a user opens an Opportunity form.

I set up the general JavaScript to run onload of the Opportunities page but I need one section to specifically run.  just one function:

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Bruno Lucas Profile Picture
    5,421 on at

    Hi,

    What do you mean BY "site-wide login function"

    if you want only one function you just need to specify.  on the library field you enter the name of the JavaScript file.

    On the "Function" field you enter the name of the JavaScript function\method without ()

    however, this is only running 1 js function when open an opportunity.

  • Community Member Profile Picture
    on at

    This is exactly what I did but it does not seem to be executing on the page load.

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    Hi..

    There might be, you forgot to publish form/ customization after adding script.

    Once published, try using CTRL+F5 to refresh your form, it is not worked then try by clearing browser cache.

    Also you can debug your JavaScript using IE developer Tools.

    Here are details how to debug

    msdn.microsoft.com/.../gg699336(v=vs.85).aspx

    msdn.microsoft.com/.../dd565625(v=vs.85).aspx

    Hope this will help..

  • Bruno Lucas Profile Picture
    5,421 on at

    yes. unless you save and publish it won't deploy.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans