Error Message:
Unable to get property 'get_current' of undefined or null reference.
Problem Description:
I wrote JavaScript
function in my core .js file and calling from SharePoint list form.
In that function i.e."TravelRequestAdminDocumentReceived()" I am trying to get some information about the current context through the SharePoint JavaScript object model and am getting below error.
SharePoint Form
Core .js file
In that function i.e."TravelRequestAdminDocumentReceived()" I am trying to get some information about the current context through the SharePoint JavaScript object model and am getting below error.
Solution:
This error is occurred
because SP.js file not get loaded. To load SP.js file
before our function we need to use following function
ExecuteOrDelayUntilScriptLoaded(TravelRequestAdminDocumentReceived,
"sp.js");
No comments:
Post a Comment