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)

Access to default.aspx

(0) ShareShare
ReportReport
Posted on by

I need to track user login by my savascript code. Can we have access to default.aspx to insert javascript code block ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    No you can't add any code to dafault .aspx .

    Only you can add a new webresource and write a script to get the current user .

    use this code to get the current user.

    Xrm.Page.context.getUserId().

                                 getUserName()

                                getUserRoles()

    Follow this link for more information:

    crmbusiness.wordpress.com/.../crm-2015crm2013-javascipt-to-get-the-current-users-name

  • Community Member Profile Picture
    on at

    I need to execute this webresource when user login for tracking. Problem is where to add webresource.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi ArmenA,

    I assume, you use the username/id to automatically login and store session data.

    You can create a html web resource and set it as landing page on login. With in the html page, write the javascript code. The only change will be, you will be using parent.Xrm instead of simple Xrm.

    Hope this gave you an idea. Mark as answer if this helped.

    Thanks !

  • Community Member Profile Picture
    on at

    Hi Bhanu Prathap Thouta.

    Can you explain more detailed how to set webresource as landing page on login ? I am new in crm.

    Thnx.

  • Verified answer
    Community Member Profile Picture
    on at

    That's fine, ArmenA. We were new and still new in some areas.

    Wouldn't be best of ideas, but you can create webresource and add it to dashboard. Set Dashboard as default. Below link will guide you.

    https://community.dynamics.com/crm/b/c5insightblog/archive/2013/05/08/non-developers-guide-how-to-use-web-resources-for-dashboards-in-dynamics-crm

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