Email Mscrm Dynamics SOAP从模板发送电子邮件
我尝试在ms dynamics crm 4中使用soap创建带有模板电子邮件的电子邮件。 我成功地创建了一封简单的电子邮件,并通过soapui发送了它。 但当我尝试使用模板电子邮件时,它不起作用。这是soap消息Email Mscrm Dynamics SOAP从模板发送电子邮件,email,soap,dynamics-crm,Email,Soap,Dynamics Crm,我尝试在ms dynamics crm 4中使用soap创建带有模板电子邮件的电子邮件。 我成功地创建了一封简单的电子邮件,并通过soapui发送了它。 但当我尝试使用模板电子邮件时,它不起作用。这是soap消息 <web:Execute xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:web="http://schemas.microsoft.com/crm/2007/WebServices"> &
<web:Execute xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:web="http://schemas.microsoft.com/crm/2007/WebServices">
<web:Request xsi:type="SendEmailFromTemplate">
<web:TemplateId>EA84AF18-FC9-E11-A165-005069A6DB2</web:TemplateId>
<web:RegardingType>invoice</web:RegardingType>
<web:RegardingId>1175670-102-E61-AB42-0050569A6DB</web:RegardingId>
<web:Target xsi:type="TargetSendFromTemplateEmail">
<web:Email>
<activityid>4B165B0-851-611-A42-00505696DB2</activityid>
</web:Email>
</web:Target>
</web:Request>
</web:Execute>
感谢您的帮助。我没有可用的4.0组织,但我针对我的2015组织执行了消息,并在Fiddler中捕获了请求。以下是请求的内容:
<Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<request i:type="c:SendEmailFromTemplateRequest" xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:c="http://schemas.microsoft.com/crm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Parameters xmlns:d="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<b:KeyValuePairOfstringanyType>
<d:key>TemplateId</d:key>
<d:value i:type="e:guid" xmlns:e="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</d:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<d:key>RegardingType</d:key>
<d:value i:nil="true"/>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<d:key>RegardingId</d:key>
<d:value i:type="e:guid" xmlns:e="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</d:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<d:key>Target</d:key>
<d:value i:type="b:Entity">
<b:Attributes>
<b:KeyValuePairOfstringanyType>
<d:key>activityid</d:key>
<d:value i:type="e:guid" xmlns:e="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</d:value>
</b:KeyValuePairOfstringanyType>
</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:KeyAttributes xmlns:e="http://schemas.microsoft.com/xrm/7.1/Contracts"/>
<b:LogicalName>email</b:LogicalName>
<b:RelatedEntities/>
<b:RowVersion i:nil="true"/>
</d:value>
</b:KeyValuePairOfstringanyType>
</b:Parameters>
<b:RequestId i:nil="true"/>
<b:RequestName>SendEmailFromTemplate</b:RequestName>
</request>
</Execute>
模板体
00000000-0000-0000-0000-000000000000
考虑类型
关于
00000000-0000-0000-0000-000000000000
目标
活动ID
00000000-0000-0000-0000-000000000000
00000000-0000-0000-0000-000000000000
电子邮件
SendEmailFromTemplate
我不太清楚与4.0端点相比,请求会有多大的不同,但它仍然可以帮助您确定如何构造请求。谢谢它帮助我。
<Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<request i:type="c:SendEmailFromTemplateRequest" xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:c="http://schemas.microsoft.com/crm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Parameters xmlns:d="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<b:KeyValuePairOfstringanyType>
<d:key>TemplateId</d:key>
<d:value i:type="e:guid" xmlns:e="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</d:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<d:key>RegardingType</d:key>
<d:value i:nil="true"/>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<d:key>RegardingId</d:key>
<d:value i:type="e:guid" xmlns:e="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</d:value>
</b:KeyValuePairOfstringanyType>
<b:KeyValuePairOfstringanyType>
<d:key>Target</d:key>
<d:value i:type="b:Entity">
<b:Attributes>
<b:KeyValuePairOfstringanyType>
<d:key>activityid</d:key>
<d:value i:type="e:guid" xmlns:e="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</d:value>
</b:KeyValuePairOfstringanyType>
</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:KeyAttributes xmlns:e="http://schemas.microsoft.com/xrm/7.1/Contracts"/>
<b:LogicalName>email</b:LogicalName>
<b:RelatedEntities/>
<b:RowVersion i:nil="true"/>
</d:value>
</b:KeyValuePairOfstringanyType>
</b:Parameters>
<b:RequestId i:nil="true"/>
<b:RequestName>SendEmailFromTemplate</b:RequestName>
</request>
</Execute>