web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

SIlverlight app fails to extract XRM values from Dynamic CRM 2011 Online Fluidic (read optimized) view, whereas it works perfectly in CRM 2011 Online Classic View.

(0) ShareShare
ReportReport
Posted on by 200

Hi CRM Community,

We are trying to tag a Silverlight Application which uses Xrm Bridge to extract Xrm values from the Dynamics CRM 2011 Online Fluidic (read-optimized) page and displays that in Silverlight control. But to our dismay we found that Xrm bridge is not working in Online CRM 2011 Fluidic view, but the same is working perfectly in Online CRM 2011 Classic view.

This is our sample piece of Silverlight xaml & xaml.cs files.

xaml:-

<Grid x:Name="LayoutRoot" Background="LawnGreen">

<Button x:Name="btnGetXrm" Content="Get XRM Value" HorizontalAlignment="Left" Margin="127,82,0,0" VerticalAlignment="Top" Width="114" Click="btnGetXrm_Click" />

<TextBlock Foreground="Red" x:Name="tbShowXrm" HorizontalAlignment="Left" Margin="83,133,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Height="28" Width="207" />

</Grid>

 

xaml.cs file :-

namespace XRMTestSilverlightApp

    {

public partial class MainPage : UserControl

        {

public MainPage()

            {

            InitializeComponent();

            }

private void btnGetXrm_Click(object sender, RoutedEventArgs e)

            {     

dynamic xrm = HtmlPage.Window.GetProperty("Xrm");       

dynamic attribute = xrm.Page.data.entity.attributes.get("name");

string Name = attribute.getValue();

tbShowXrm.Text = Name;

            }

        }

    }

This Silverlight app (.xap file) tagged into "Account" record in the CRM 2011 Online Fluidic view, doesnt display xrm values while clicking the button. Whereas the same works in CRM 2011 Online Classic view. Also the background color of lawngreen appears in Classic view but doesn't appear in Fluidic view.

We are stuck on this for a while now and we have release this week. Please share your thoughts on this as soon as possible. What is the reason behind this different behavior across the Classic & Fluidic views and how can we overcome this in Fluidic view?

 

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    apurv Profile Picture
    926 on at

    Hi Tirtha,

    Can you please confirm if you're using read optimized form feature with embedded Silverlight web resource? If so the Xrm scripts are restricted to work here. Please check blogs.msdn.com/.../read-optimized-forms.aspx

    Regards,

    Apurv

  • Tirtha D Profile Picture
    200 on at

    Hi Apurv,

    Thanks for your link. Though it didn't give the answer directly but I did able to figure out the way from that link :) That's all I need :) I am detecting whether my web-resource is hosted in read-optimized form by checking the value from Xrm.Page.ui.getFormType and restricting my control to show on that particular form type.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans