Quantcast
Channel: CRM Development 論壇
Viewing all articles
Browse latest Browse all 10280

CRM 2011 Rollup 12 issue: Unable to cast type 'System.String' to 'System.Windows.Browser.ScriptObject' when calling HtmlPage.Window.Invoke from Silverlight

$
0
0

Code Line:
//invoke dialog from Silverlight
ScriptObject result = (ScriptObject)HtmlPage.Window.Invoke("showModalDialog", url, args, features);

Issue:
Whenever above line of code executed from Silverlight control code in CRM Online O365 with UR12, it throws error
"Unable to cast type 'System.String' to 'System.Windows.Browser.ScriptObject'".
Same code is working in On Premise (with UR11) & earlier CRM Online (with UR11)

Root Cause:
Before UR12 (Polaris) update, return type of "HtmlPage.Window.Invoke("showModalDialog", url, args, features)" wasScriptObject but now UR12 returns it as "String" (JSON string).

Resolution: We have currently resolved this by adding switch case and converting Json string to object.

Question:
Does anyone faced this issue? Is it change Microsoft come up with in UR12 (if documented)? Or it's a bug?



Viewing all articles
Browse latest Browse all 10280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>