0

i have a Problem with CRM and JavaScript. I would like to reference the sharepoint library in a JavaScript file. But it doesn´t work... How can i reference the sharepoint library?

For example:

/// <reference path="C:\sp.js" /> 

function testFieldChange() {

    var serverUrl = Xrm.Page.context.getServerUrl();
    ODataPath = serverUrl + "/xrmservices/2011/OrganizationData.svc";

    // ... sharepoint code ...

    Xrm.Page.getAttribute('test_field').setValue('Test');
}

1 Answer 1

1

You'll need to upload your sp.js file as a CRM web resource. Once you've done that it can be referenced as a script library in your forms and other JS code.

You can read more about using JScript in CRM here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.