如何以编程方式设置 SharePoint 2010 中工作流的显示名称
我在设置功能激活工作流的显示名称时遇到问题。
我得到的是一个使用所需内部名称创建的工作流(使用 SPWorkflowAssociation.CreateListContentTypeAssociation 获取 SPWorkflowAssociation 对象)。使用该方法调用设置名称后,我将 SPWorkflowAssociation.Name 设置为所需的显示名称,然后将工作流关联添加到列表中,然后在关联列表上调用更新。
我看到的结果是内部名称和显示名称都发生了更改(需要内部名称来链接 SharePoint 列表和客户端对象模型,我们需要这个内部名称,因为显示名称对于其他语言来说是不同的)。
有谁知道如何在代码中正确设置它?这看起来应该是可能的,但我并没有从我的调查中得到任何乐趣。
谢谢!
I'm having an issue setting the display name for a workflow on feature activation.
What I have got is a workflow that I create with a desired internal name (using SPWorkflowAssociation.CreateListContentTypeAssociation to get an SPWorkflowAssociation object). Once the name is set with that method call, I set the SPWorkflowAssociation.Name to the desired display name after that, add the workflow association to the list, and then call update on the associated list.
The result I see is that the internal name and the display name are both changed (internal name is required to link between the SharePoint list and the Client Side Object Model and we need this internal name as the display name is different for other languages).
Does anyone know how to set this properly in code? It looks like something that should be possible but I'm getting no joy from my investigations.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过使用描述字段存储“静态”名称来解决这个问题,然后通过此描述字段而不是内部名称查找关联。
I got around this by using the description field to store a 'static' name and then later find associations via this description field rather than the internal name.