locked
FetchXML to populate ComboBox RRS feed

  • Question

  • I am trying to write a simple FetchXml to retrieve all quote Names from Dynamics CRM and pass the results to a combobox what is the best way to do this?

    So Far I have:

      string fetch1 = @"<fetch distinct='false' mapping='logical' output-format='xml-platform' version='1.0'>
                                        <entity name='quote'>
                                            <attribute name='name'/>
                                            <attribute name='quoteid'/>
                                            <order descending='false' attribute='name'/>
                                                <filter type='and'>
                                                    <condition attribute='statecode' value='0' operator='eq'/>
                                                </filter>
                                            </entity>
                                       </fetch>";
    
                        EntityCollection result1 = _serviceProxy.RetrieveMultiple(new FetchExpression(fetch1));

    Other than pass the values one by one to the combobox can they be bound to it or???

    regards,

    Matt

    Tuesday, November 10, 2015 10:00 AM

Answers

  • Hey,

    Can you please elaborate further? Are you binding dropdownlist on Asp.net page?

    If yes, You have the EntityCollection with you. You can iterate to EntitiCollection and add to datatable or List and bind to Drowpdown.

    Thanks!

    Kalim

    • Marked as answer by Matt_H_UK Tuesday, November 10, 2015 4:44 PM
    Tuesday, November 10, 2015 1:17 PM

All replies

  • Hey,

    Can you please elaborate further? Are you binding dropdownlist on Asp.net page?

    If yes, You have the EntityCollection with you. You can iterate to EntitiCollection and add to datatable or List and bind to Drowpdown.

    Thanks!

    Kalim

    • Marked as answer by Matt_H_UK Tuesday, November 10, 2015 4:44 PM
    Tuesday, November 10, 2015 1:17 PM
  • Thanks for this, I was having a silly moment and posted the question without really thinking.

    regards,

    Matt

    Tuesday, November 10, 2015 4:44 PM