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.and CRM 2011

(0) ShareShare
ReportReport
Posted on by

I've created a Silverlight webresource, For this reason, I've imported this service

http://xxxxxx:8088/CRM/XRMServices/2011/Organization.svc

but when, I want to create a OrganizationRequest, i have this error

Error 1 Cannot apply indexing with [] to an expression of type 'Con.CrmOrganization.OrganizationRequest' C:\SilverlightApplication\Activity.xaml.cs 42 13 SilverlightApplication

Can anybody help me?

*This post is locked for comments

I have the same question (0)
  • ScottDurow Profile Picture
    21 on at

    Can you post what code you have at the line where the exception is thrown in Activity.xaml.cs?

  • Atilin Profile Picture
    on at

    Ups, sorry...

    This is the line

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    I prefer to create types for each request/response to make it easier to set the values - but either way, you'll need to use:

    Request.Parameters = new ParameterCollection();

    Request.Parameters.SetItem("Query", Query);

    hth

  • Atilin Profile Picture
    on at

    Hi,

    But, when i put this code, i have another error 

    Can you explain more about "create types for each request/response", Do you have a link for read about it?

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    In your original post - I see now that you were using the approach from the sdk - msdn.microsoft.com/.../gg594452.aspx

    It looks like you are missing the OrganizationRequest partial class that defines the default indexer.

    I suggest you make sure that you've added the 'SilverlightExtensionMethods.cs' code from the sdk sample.

    hth

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