Skip to content

Call Microsoft dynamics 365 Online CRM api from PHP script and and get data. Help to integrate PHP project with Dynamics 365 application and interactive API calls.

sandeepstw/Dynamics-CRM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

PHP script to call dynamics crm api

Code sample related to Microsoft Dynamics CRM

This php script can be used to make connection to microsoft dynamics online or on premise and fetch data using crm soap services.

Credentials required to connection online

// CRM Online $url = "https://yourorg.crm.dynamics.com/"; $username = "email@domain.net"; $password = "Password";

Create a object of DynamicsCrmHeader which is under /CrmLibrary/DynamicsCrmLibrary.php file. It has required soap header to connect dynamics crm online.

$dynamicsCrmHeader = new DynamicsCrmHeader ();

In Example, we are getting list data from crm and it requires a soap request enavalop. which you can see in index.php file.

Soap request is xml script which you can excute using soap client.

$client = new DynamicsCrmSoapClient ();

$response = $client->ExecuteSOAPRequest ( $authHeader, $xml, $url );

Return response is xml format which needs to convert in document type to read data properly, using script -

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

Once it is converted in dom object you can use php lib to read data.

Email us on info@softechworld.com for any kind of help.

About

Call Microsoft dynamics 365 Online CRM api from PHP script and and get data. Help to integrate PHP project with Dynamics 365 application and interactive API calls.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages