PHP を使用して、CRM ダイナミクス 2011 へのオンライン接続を成功させることができました。新しいリードを作成し、次の提示された値を追加することさえできました。
<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>name</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">Test Here</c:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<c:key>emailaddress1</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">test@test.com</c:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<c:key>address1_city</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">Location Here</c:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<c:key>telephone1</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">123456</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>account</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>
</s:Body>
私が今行き詰まっているのは、ルックアップフィールド「primarycontactid」に値を追加する方法です
たとえば、「Mahmoud Jabado」の値を追加したいとしましょう
私は、javascript 関数があることを赤くしています。どこで、どのように実装するかについて少し迷っていました。上記の XML と同様の方法で値を設定する方法はありませんか?
PS: 私は PHP でプログラミングしていますが、私のプログラミング レベルはそれほど高くありません。よろしくお願いします。