title: how to get label of optionset in crm
body: <p>I'm using D-CRM 2016 I'm trying to get a label of optionset in client-side (js) ,I get an error and can't find a reason why:
  thats my code:</p>
  
  <pre><code>SDK.Metadata.RetrieveAttribute("myEntity", "myFieldName", null, false,
                  function (result) {
                  alert(result);
                  for (var i = 0; i &lt; result.OptionSet.Options.length; i++) {
                  var loopText = result.OptionSet.Options[i].Label.LocalizedLabels[0].Label;
                  var loopValue = result.OptionSet.Options[i].Value;
  
              }
     },
  function (error) { }
  ,false);
  </code></pre>
  
  <p>My error:</p>
  
  <pre><code>Uncaught TypeError: _Context(...).getServerUrl is not a function
      at _getUrl (/SDev/%7B636656731400000359%7D/WebResources/xnes_SDK.MetaData?ver=1561501807:451)
      at Object.RetrieveAttribute (/SDev/%7B636656731400000359%7D/WebResources/xnes_SDK.MetaData?ver=1561501807:323)
      at &lt;anonymous&gt;:1:14
      at Mscrm.CommandHandler.$Ce_1 (JsProvider.ashx:8)
      at Mscrm.CommandHandler.$Ag_1 (JsProvider.ashx:8)
      at Mscrm.CommandHandler.handleCommand (JsProvider.ashx:8)
      at Mscrm.CommandBarData.executeCommand (JsProvider.ashx:8)
      at Mscrm.ButtonControl.executeCommand (ribbon.js:1)
      at Mscrm.ButtonControl.click (ribbon.js:1)
      at Mscrm.CommandBar.onClickHandler (ribbon.js:1)
  </code></pre>