serverURL issue

Aug 8, 2013 at 4:11 PM
Edited Aug 8, 2013 at 4:18 PM
There is a problem in the current code, which returns blank preview when using lookup preview is used on on-premise servers. The SDK.RetrieveData.js function needs to be updated to the following:
_ServerUrl : function () { ///<summary>
   /// Private function used to establish the path to the SOAP endpoint based on context
   /// provided by the Xrm.Page object or the context object returned by the GlobalContext object.
   ///</summary>
   var serverUrl;
   if (Xrm.Page.context.getClientUrl !== undefined) {
      serverUrl = Xrm.Page.context.getClientUrl();
   } else {
      serverUrl = Xrm.Page.context.getServerUrl();
   }
   return serverUrl + "/XRMServices/2011/Organization.svc/web";
},
Aug 22, 2013 at 1:21 PM
Thanks a ton "rhanoudi". I did everything according to the post but was getting blank preview till I found your post and made the change. Voila it started working.