我有一个 html 页面,上面有这个。
var accountid = getParameterByName("AccountId");
var account = null;
if (accountid != null)
{
account = GetEntity("Account", accountid, "Name, piv_BusinessUnit, AccountId");
}
在同一页的底部是这个
<script src="js/datasource.CRM.js"></script>
在那个文件中是这个
function GetEntity(logicalName, id, columnSet)
{
return RunQuery(logicalName + "Set?&$filter="+logicalName+"Id eq guid'{" + id + "}'" + "&$select="+columnSet);
}
运行页面时出现此错误
Uncaught ReferenceError: GetEntity is not defined
有谁知道为什么找不到Javascript函数的任何原因???