Passing Calling User to an Aspx Page from Sitemap in CRM 2011

How to Pass the Calling User to an Aspx Page from Sitemap in CRM 2011

First, you need to create a simple HTML file and put the following codes in that page. Add the HTML file into the web resource. Call that file from your Sitemap. By the way, don’t forget to redirect to your aspx page in the HTML file. 🙂

<HTML><HEAD><TITLE></TITLE></HEAD>
<BODY onload=redirectAspxPage(); contentEditable=true>
<SCRIPT type=text/javascript src=”../ClientGlobalContext.js.aspx”></SCRIPT>

<SCRIPT type=text/javascript>
function redirectAspxPage() {

var userid = window.parent.Xrm.Page.context.getUserId();

window.location.href = “http://YOUR_URL/YOUR_PAGE.aspx?userid= ” + userid;
}
</SCRIPT>
</BODY></HTML>

2 Comments

Filed under Passing Calling User to an Aspx Page from Sitemap

2 responses to “Passing Calling User to an Aspx Page from Sitemap in CRM 2011

  1. Thanks for some other great article. Where else could anybody get that tpe of
    info in such a perfect method of writing? I’ve a presentation subsequent week,
    and I am on the search for such information.

  2. That is a very good tip especially to those new to the blogosphere.
    Simple but very accurate information… Thanks
    for sharing this one. A must read post!

Leave a comment