Notifications
Announcements
No record found.
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
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
I need to execute this webresource when user login for tracking. Problem is where to add webresource.
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 !
Hi Bhanu Prathap Thouta.
Can you explain more detailed how to set webresource as landing page on login ? I am new in crm.
Thnx.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2