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?