MS CRM 4.0 从另一个列表中删除不活动帐户
我有以下问题,我似乎找不到答案...... 我有一个 CRM 4.0 系统,我想实现以下目标:
当我有一个处于非活动状态的联系人/帐户时,可以将其从另一个列表(例如营销列表)中删除。
所以我已经拥有了一切,直到删除部分。我有一个包含非活动帐户/联系人(ID(GUID))的集合,我只需要以某种方式从列表中删除该成员。所以有一个类 RemoveMemberListRequest
看起来是正确的,唯一的问题是,不知何故我无法让它工作。
foreach (Guid currentMember in inactiveMembers)
{
RemoveMemberListRequest req = new RemoveMemberListRequest();
req.ListId = context.PrimaryEntityId;
req.EntityId = currentMember ;
RemoveMemberListResponse rmlResp = (RemoveMemberListResponse)crmService.Execute(req);
}
当它尝试执行时,请求失败,并出现非常普遍的错误,即无法执行请求。我也不确定这是否是正确的方法...
还有另一个类似乎有一个可能有用的属性: QualifyMemberListRequest
具有属性:OverrideorRemove
但我不太明白这个是如何工作的,也找不到足够的信息。
有人吗?
I have the following problem, on which I can't seem to find an answer...
I have a CRM 4.0 system and I want to achieve the following:
When I have a contact/account that's inactive to remove it from another list, for example the Marketing list.
So I already have everything, up to the removing part. I have a collection with the inactive accounts/contacts (The ID's(GUID)), I just need to remove somehow the member from the list. So there is a class RemoveMemberListRequest
which looks like the correct one, the only problem is, somehow I can't get it to work.
foreach (Guid currentMember in inactiveMembers)
{
RemoveMemberListRequest req = new RemoveMemberListRequest();
req.ListId = context.PrimaryEntityId;
req.EntityId = currentMember ;
RemoveMemberListResponse rmlResp = (RemoveMemberListResponse)crmService.Execute(req);
}
When It tries to Execute, the request it fails, with very generic error, that it was unable to execute the request. I am also not sure if that's the correct way of doing it...
There is another class that seems to have a property that might be useful:QualifyMemberListRequest
With property: OverrideorRemove
But I don't really understand how this one works, and I couldn't find enough information.
Anybody?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
RemoveMemberListRequest
是正确的请求。几乎所有由 CRM Web 服务请求引发的异常实际上都是
SoapException
类型,在这种情况下,它们将始终在中显示“服务器无法处理请求” Message
属性,这当然不是很有帮助。要了解有关错误的更多信息,您必须将异常视为
SoapException
并查看Detail.InnerText
属性,该属性在大多数情况下将提供有关以下方面的有用信息:出了什么问题:我猜你要么在某个地方捡到了一些“错误”的ID,要么是角色/权限问题。
RemoveMemberListRequest
is the correct request.Pretty much all exceptions thrown by CRM webservice requests are actually of type
SoapException
, and in that case they will always say "Server was unable to process request" in theMessage
property, which of course isn't very helpful.To find out more about the error, you must treat the exception as a
SoapException
and have a look at theDetail.InnerText
property, which in most cases will provide useful information about what went wrong:I guess you either picked up some "wrong" ID somewhere, or it is a roles/privileges issue.