CRM 2016 #Dashboards #CRM2016 #IFrames #MoussaElAnnan
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style>
.labels {
color: #444444;
display: block;
white-space: nowrap;
overflow: hidden;
position: relative;
text-align: left;
float: left;
overflow: hidden;
display: inline-block;
white-space: nowrap;
font-size: 12px;
font-family: "Segoe\000020UI";
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
<script src="../../ClientGlobalContext.js.aspx" type="text/javascript"></script>
</head>
<body>
<script>
function _getContext() {
var errorMessage = "Context is not available.";
if (typeof GetGlobalContext != "undefined")
{ return GetGlobalContext(); }
else
{
if (typeof Xrm != "undefined") {
return Xrm.Page.context;
}
else { throw new Error(errorMessage); }
}
}
function showUserID() {
var xrmContext = _getContext();
alert(xrmContext.getUserId());
}
</script>
<a href="javascript:showUserID();" id="newBusinessReport" target="_blank" class="labels">New Business Report</a>
</body>
</html>