<script src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js" type="text/javascript"> </script> <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script> <script type="text/javascript">
document.onreadystatechange = function () {
if (document.readyState === 'complete') {
loaddata();
debugger;
var hostweburl;
hostweburl =
decodeURIComponent(
getQueryStringParameter("https://*********/*****/******/****") //my sharepoint URL.
);
// The js files are in a URL in the form:
// web_url/_layouts/15/resource_file
var scriptbase = hostweburl + "/_layouts/15/";
// Load the js files and continue to
// the execOperation function.
$.getScript(scriptbase + "SP.Runtime.js",
function () {
debugger;
$.getScript(scriptbase + "SP.js", execOperation);
}
);
// Function to execute basic operations.
function execOperation() {
// return the file paths.
}
}
}
</script>
*This post is locked for comments
I have the same question (0)Hi,
If its only one SP.Runtime.js file then can you not upload it as a web resource in Dynamics to refer from there. It would be much easier and faster rather than loading it from SharePoint.
I am not sure if SharePoint will allow (security) you to access files inside a layout folder.
hope this helps,