Skip to main content
Fixed callbacks in both examples by removing parentheses -- updateProjectEC() becomes updateProjectEC
Source Link

It is not able to find the function in any of the loaded libraries. So theThe method is running before sp.js is loaded.Add Add ExecuteOrDelayUntilScriptLoaded method before calling your function.

 ExecuteOrDelayUntilScriptLoaded(updateProjectEC(), "sp.js");

or

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', updateProjectEC());

It is not able to find the function in any of the loaded libraries. So the method is running before sp.js is loaded.Add ExecuteOrDelayUntilScriptLoaded method before calling your function.

 ExecuteOrDelayUntilScriptLoaded(updateProjectEC(), "sp.js");

or

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', updateProjectEC());

It is not able to find the function in any of the loaded libraries. The method is running before sp.js is loaded. Add ExecuteOrDelayUntilScriptLoaded method before calling your function.

ExecuteOrDelayUntilScriptLoaded(updateProjectEC, "sp.js");

or

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', updateProjectEC);
Source Link
Jinxed
  • 1.2k
  • 1
  • 14
  • 27

It is not able to find the function in any of the loaded libraries. So the method is running before sp.js is loaded.Add ExecuteOrDelayUntilScriptLoaded method before calling your function.

 ExecuteOrDelayUntilScriptLoaded(updateProjectEC(), "sp.js");

or

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', updateProjectEC());