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)

Help in retrieving all entities

(0) ShareShare
ReportReport
Posted on by

Hi

I am trying to retrieve all the entities and getting error. Need help in integrating microsoft dynamic crm in php.

Below is my code. Please help me correcting it.

$xml = " <s:Body>";
$xml .= " <execute xmlns:i=\"www.w3.org/.../XMLSchema-instance\" xmlns=\"schemas.microsoft.com/.../Services\">";
$xml .= " <request i:type=\"a:RetrieveAllEntitiesRequest\" xmlns:a=\"schemas.microsoft.com/.../Contracts\">";
$xml .= " <a:parameters xmlns:b=\"schemas.datacontract.org/.../System.Collections.Generic\">";
$xml .= " <a:keyvaluepairofstringanytype>";
$xml .= " <b:key>EntityFilters</b:key>";
$xml .= " <b:value i:type=\"c:EntityFilters\" xmlns:c=\"schemas.microsoft.com/.../Metadata\">Entity</b:value>";
$xml .= " </a:keyvaluepairofstringanytype>";
$xml .= " <a:keyvaluepairofstringanytype>";
$xml .= " <b:key>RetrieveAsIfPublished</b:key>";
$xml .= " <b:value i:type=\"c:boolean\" xmlns:c=\"schemas.microsoft.com/.../Arrays\">true</b:value>";
$xml .= " </a:keyvaluepairofstringanytype>";
$xml .= " </a:parameters>";
$xml .= " <a:requestid i:nil=\"true\">";
$xml .= " <a:requestname>RetrieveAllEntities</a:requestname>";
$xml .= " </a:requestid>";
$xml .= " </request>";
$xml .= " </execute>";

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

$executeSoap = new CrmExecuteSoap ();
$response = $executeSoap->ExecuteSOAPRequest ( $authHeader, $xml, $url );

$responsedom = new DomDocument ();
$responsedom->loadXML ( $response );

echo "<pre>";
print_r($responsedom);
echo "</pre>";

this is the error I am getting

[textContent] => schemas.microsoft.com/.../faulturn:uuid:{530CEDCF-4076-4CF5-E81B-674B85807CD1}00000000-0000-0000-0000-0000000000002015-11-03T06:56:11.208Z2015-11-03T07:01:11.208Zs:Receivera:InternalServiceFaultThe server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the  configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sayhaitokumar Profile Picture
    7,042 on at

    Hello,

    In this situation i suggest you to create a C# Web Service that will act as a bridge between CRM and your php code.

    The Web Service written in .NET so can easily pull the data from CRM and because is a Web Service you can consume it by any platform

    As for as i know there is no complete library out there for connecting to CRM using PHP

    stackoverflow.com/.../integrating-microsoft-dynamic-2013-or-2015-with-php

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