locked
CRM 2011: SDK.MetaData.js doesn't work RRS feed

  • Question

  • Hello,

    After upgrading to Rollup 16. the old SDK.MetaData.js doesn't work any more. So I replaced old one with newest SDK.MetaData.js, which I grabbed from sdk\samplecode\js\soapforjscript\soapforjscript\scripts. However, when I try to call SDK.MetaData in other function, it shows undefined, no value retrieved. if I change back to old one, it can retrieve all info. Here is the screenshot for two SDK.MetaData libraries. You can find the function I was trying to run from these two libraries:

    SDK.MetaData.RetrieveEntityAsync() (old SDK.MetaData)

    SDK.MetaData.RetrieveAttribute() (new SDK.MetaData)

    Can you tell me anything I did wrong? Thanks.

    This the screenshot for this library in entity:

    This is new SDK.MetaData screenshot:



    Thursday, April 24, 2014 5:52 PM

All replies

  • Sounds like one of two things are happening:

    1. Your SDK.MetaData library has an error on load that is preventing the objects from instantiating.
    2. The SDK.MetaData library has not fully loaded yet when your onload() script runs.  I have seen this intermittently since they changed CRM to load JavaScript libraries as part of the document body.  To check for this, you could try using a settimeout() function to delay your call to the SDK.MetaData function you want.
    Thursday, April 24, 2014 7:44 PM