Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to fetch data List Type=Dyanamic using soap query

(0) ShareShare
ReportReport
Posted on by 4,601

Hi,

How to fetch data List Type=Dynamic using soap query. I am able to get data for static List Type but it returns 0 for dynamic List Types.

Thanks

Sandeep 

*This post is locked for comments

  • Suggested answer
    sandeepstw Profile Picture
    4,601 on at
    RE: How to fetch data List Type=Dyanamic using soap query

    $xml ="<s:Body>";

       $xml .="<Execute xmlns=\"schemas.microsoft.com/.../Services\" xmlns:i=\"www.w3.org/.../XMLSchema-instance\">";

       $xml .="<request i:type=\"a:RetrieveMultipleRequest\" xmlns:a=\"schemas.microsoft.com/.../Contracts\">";

       $xml .="<a:Parameters xmlns:b=\"schemas.datacontract.org/.../System.Collections.Generic\">";

       $xml .="<a:KeyValuePairOfstringanyType>";

               $xml .="<b:key>Query</b:key>";

               $xml .="<b:value i:type=\"a:QueryExpression\">";

                 $xml .="<a:ColumnSet>";

                   $xml .="<a:AllColumns>true</a:AllColumns>";

                   $xml .="<a:Columns xmlns:c=\"schemas.microsoft.com/.../Arrays\">";

    //  $xml .="<c:string>query</c:string>";

                    // $xml .="<c:string>membertype</c:string>";

                   $xml .="</a:Columns>";                

                 $xml .="</a:ColumnSet>";

    $xml .= "<a:Criteria>";

                 $xml .= "<a:Conditions>";

                  $xml .= "<a:ConditionExpression>";

                  $xml .= "<a:AttributeName>leadid</a:AttributeName>";

                  $xml .= "<a:Operator>Equal</a:Operator>";

                  $xml .= "<a:Values xmlns:c=\"schemas.microsoft.com/.../Arrays\">";

                  $xml .= "<c:anyType i:type=\"d:string\" xmlns:d=\"www.w3.org/.../XMLSchema\">".$leadid."</c:anyType>";

                  $xml .= "</a:Values>";

                  $xml .= "</a:ConditionExpression>";

                 $xml .= "</a:Conditions>";

                  $xml .= "<a:FilterOperator>And</a:FilterOperator>";

                  $xml .= "<a:Filters />";

                  $xml .= "</a:Criteria>";

                 $xml .="<a:Distinct>false</a:Distinct>";

                 $xml .="<a:EntityName>lead</a:EntityName>";

                 $xml .="<a:LinkEntities />";

                 $xml .="<a:Orders />";

                 $xml .="<a:PageInfo>";

                   $xml .="<a:Count>0</a:Count>";

                   $xml .="<a:PageNumber>0</a:PageNumber>";

                   $xml .="<a:PagingCookie i:nil=\"true\" />";

                   $xml .="<a:ReturnTotalRecordCount>false</a:ReturnTotalRecordCount>";

                 $xml .="</a:PageInfo>";

                 $xml .="<a:NoLock>false</a:NoLock>";

               $xml .="</b:value>";

             $xml .="</a:KeyValuePairOfstringanyType>";

           $xml .="</a:Parameters>";

           $xml .="<a:RequestId i:nil=\"true\" />";

           $xml .="<a:RequestName>RetrieveMultiple</a:RequestName>";

         $xml .="</request>";

       $xml .="</Execute>";

     $xml .="</s:Body>";

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans