几天来,我一直在把头撞在桌子上。我的创建帐户 xml 请求工作正常,但我的事件 xml 请求不起作用。
在下面,任何帮助将不胜感激。
$accountsRequest = EntityUtils::getCreateCRMSoapHeader($CRMURL, $securityData).
'
<s:Body>
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<b:KeyValuePairOfstringanyType>
<c:key>ownerid</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $ownerid . '</c:value>
<c:key>customerid</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $customerid . '</c:value>
<c:key>subjectid</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $subjectid . '</c:value>
<c:key>title</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $title . '</c:value>
<c:key>new_surveyid</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_survey_id . '</c:value>
<c:key>new_leadsource</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_leadsource . '</c:value>
<c:key>new_forename</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_forename . '</c:value>
<c:key>new_surname</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_surname . '</c:value>
<c:key>new_company</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_company . '</c:value>
<c:key>new_email</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_email . '</c:value>
<c:key>new_phone</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_phone . '</c:value>
<c:key>new_datetravel</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_datetravel . '</c:value>
<c:key>new_drivername</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_drivername . '</c:value>
<c:key>new_punctuality_pickup</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_punctuality_pickup . '</c:value>
<c:key>new_punctuality_dropoff</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_punctuality_dropoff . '</c:value>
<c:key>new_interior</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_interior . '</c:value>
<c:key>new_exterior</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_exterior . '</c:value>
<c:key>new_courtesy</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_courtesy . '</c:value>
<c:key>new_appearance</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_appearance . '</c:value>
<c:key>new_comments</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_comments . '</c:value>
<c:key>new_survey_date</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_survey_date . '</c:value>
<c:key>new_survey_score</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">' . $new_survey_score . '</c:value>
</b:KeyValuePairOfstringanyType>
</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>incident</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>
</s:Body>
</s:Envelope>
';