none
POL javascript problem... RRS feed

  • Question

  • Hi

    The following code works fine in a Project Site page but gives an error in a PDP.  On the off chance, any thoughts on why this might be and if there is a fix?

    // Called only once the required sp.js file is loaded by SharePoint

    ExecuteOrDelayUntilScriptLoaded(getProjectUID, "sp.js");

    //Get the current project UID for querying data related to it

    function getProjectUID() {

        var ctx = new SP.ClientContext.get_current();

        this.web = ctx.get_web();

        this.props = this.web.get_allProperties();

        ctx.load(this.web);

        ctx.load(this.props);

        ctx.executeQueryAsync(Function.createDelegate(this, successHandler), Function.createDelegate(this, failedHandler));

    }

    Many thanks 

    James 

    Thursday, February 14, 2019 3:27 PM

Answers

All replies