本文介绍了通过PHP API MS Dynamics CRM中访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要验证和使用PHP API中的MS Dynamics CRM中进行CURD操作。

I need to authenticate and perform CURD operations in MS Dynamics CRM using PHP API.

我已经提到Reference1 的的

和使用以下步骤进行:

settings >
Administration >
system settings >
previews >
accept terms & conditions >
Web API Developer Preview  >
Enable Dynamics CRM Web API Preview to yes

这是在 Reference4 链接。

当我访问,

https://开头<您的组织名称> .crm.dynamics.com / API /数据/触点

https://开头<您的组织名称> .crm.dynamics.com / API /数据/帐户

我可以得到我所有的联系人和客户。

I can get all my contacts and accounts.

但现在我想用API,可以通过PHP来访问它,

But now I want to access it through php using api,


  1. 如何发送请求的联系人和客户?

  2. 如何在没有提供信用卡信息创建一个使用AAD为试用版的应用程序?

我试过低于code:

$ZDURL= 'https://www.microsoft.com/en-sg/dynamics/';
curlWrap("GET",$ZDURL);
function curlWrap($action,$ZDURL)
{
    $ch = curl_init();

    /* $data = array('accountType' => 'MICROSOFT DYNAMICS',
            'id' => '83261c03-3a21-4c64-b62c-00d6c2127c64',
            'source'=>'PHI-cUrl-Example',
            'service'=>'lh2'); */

    //curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_USERPWD, "username:password");

    curl_setopt($ch, CURLOPT_URL, $ZDURL);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    //curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");

    $output = curl_exec($ch);
    if($output===false)
    {
        echo "curl error >> ".curl_error($ch);
        exit;
    }
    else
    {
        echo "No Curl error occurs";
        echo "<pre>";print_r($output);
    }
    exit;
    curl_close($ch);
    $decoded = json_decode($output);

    return $decoded;
}

这说明如下:

最后,得到这个链接,但不知道如何使用PHP传递请求。

Finally, got this Query Data using the Web API link, but no idea how to pass the request using php.

需要帮助使用API​​来获取CRM的详细信息。

Need a help to retrieve CRM details by using api.

推荐答案

这是一个相当COM $上连接到Office365从PHP REST API是P&$ phensive教程。为新的CRM 2016年/ CRM 2015年的WebAPI preVIEW,运作是相同的,仅在端点和该查询是不同的。

This is quite a comprehensive tutorial on connecting to Office365 rest api's from PHP. For the new CRM 2016 / CRM 2015 WebApi preview, the workings are the same, only the endpoint and the query is different.

至于发行数量2,如果你通过湛蓝的门户网站,你需要一张信用卡。你可能想看看新的Office365应用注册门户。我不知道是否它支持动态CRM。

As for issue number 2, if you go through the azure portal, you need a credit card. You might want to check out the new Office365 app registration portal http://dev.office.com/app-registration. I don't know for sure if it supports Dynamics CRM.

这篇关于通过PHP API MS Dynamics CRM中访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 19:46