我正在尝试将 Dynamics CRM 中的值转换为 HTML 网络资源。我发现了这个并试图从中提取代码:
https://msdn.microsoft.com/en-us/library/jj602964(v=crm.7).aspx
它说用来var nameValue = Xrm.Page.getAttribute("name").getValue();
把它拿出来。
我的代码是(警报只是为了尝试它是否获得正确的值):
<html><head>
<meta charset="utf-8">
</head>
<body>
<button onclick="getquotenumber()">Try it</button>
<script>
function getquotenumber() {
var getquote = Xrm.Page.getAttribute("quotenumber").getValue();
alert(getquote);
}
</script>
</body></html>
单击“尝试”时没有任何反应!我究竟做错了什么?
谢谢,约翰内斯