I have a html page with this on it.
var accountid = getParameterByName("AccountId");
var account = null;
if (accountid != null)
{
account = GetEntity("Account", accountid, "Name, piv_BusinessUnit, AccountId");
}
At the bottom of that same page is this
<script src="js/datasource.CRM.js"></script>
Within that file is this
function GetEntity(logicalName, id, columnSet)
{
return RunQuery(logicalName + "Set?&$filter="+logicalName+"Id eq guid'{" + id + "}'" + "&$select="+columnSet);
}
When running the page I get this error
Uncaught ReferenceError: GetEntity is not defined
Does anyone know any reason why a Javascript function is not found when it is there???