简体   繁体   English

将具有已升级字段的InfoPath表单部署到WSP中的SharePoint

[英]Deploy an InfoPath form with promoted fields to SharePoint within a WSP

I've been playing around with publishing an InfoPath form to a SharePoint site as a content type to try and see what happens. 我一直在尝试将InfoPath表单作为内容类型发布到SharePoint网站,以尝试观察会发生什么。 It works okay in that updating a form instance in a library will update the library columns. 它的工作方式还行,因为更新库中的表单实例将更新库列。 Short of the promoted properties in InfoPath however I can't see how this mapping works. 缺少InfoPath中的提升属性,但是我看不到此映射的工作方式。

My aim is to have a CAML defined content type as part of a WSP. 我的目标是将CAML定义的内容类型作为WSP的一部分。 The content type will install preconfigured having the promoted fields from InfoPath. 内容类型将安装具有InfoPath中提升字段的预配置内容。 There will be some additional fields not in the form but needed in the content type for the workflow that will run when these forms are filled in. Actually the extra fields in the content type arn't critical, one step at a time. 填写这些表单时,将存在一些其他字段,但这些字段不在表单中,而是工作流的内容类型所需要的。实际上,内容类型中的其他字段不是关键的,一次仅一步。

I've tried specifying the promoted fields in the form options and network publishing. 我尝试在表单选项和网络发布中指定升级字段。 Then creating a form content type by hand through the website and linking it to the uploaded form template. 然后,通过网站手动创建表单内容类型,并将其链接到上载的表单模板。 I would hope that when the form runs it would check the list and create the columns but it doesn't do that. 我希望当表单运行时可以检查列表并创建列,但不会那样做。 I've also tried SharePoint publishing the form as a content type, then creating my own content type that references the template URL where it was published. 我还尝试过SharePoint将表单作为内容类型发布,然后创建自己的内容类型,该内容类型引用发布它的模板URL。 Creating the site columns by hand and linking them in with my content type. 手动创建网站栏并将其与我的内容类型链接。 Whatever way I try it the InfoPath forms don't link the promoted fields to the columns I've created. 无论我尝试哪种方式,InfoPath表单都不会将提升的字段链接到我创建的列。

So short of publishing properly through InfoPath I can't get this mapping working myself. 因此,由于无法通过InfoPath正确发布,我无法自己运行此映射。 Really I'm trying to reproduce what the SharePoint publishing does without understanding how it maps the fields. 确实,我正在尝试重现SharePoint发布所做的工作,而不了解它如何映射字段。 If I can't do it through the website I'm hardly going to get it going with CAML and have this as a single installable solution where a customer would be able to activate the WSP and have the site, libraries, content types, lists, forms, workflows pre-created and all set up ready to use. 如果我无法通过网站进行操作,那么我几乎不会将其与CAML结合使用,并将其作为一个可安装的解决方案,客户可以激活WSP并拥有网站,库,内容类型,列表,表单,工作流程已预先创建,并且所有设置均可使用。 I already do this with other projects just not with actual forms libraries. 我已经在其他项目中做到了这一点,而不仅仅是使用实际的表单库。

Any advice would be very much appriciated. 任何建议都会非常有用。

[EDIT] If it comes to it I might have to resort to (shudder) having some code in the form that on close would write particular fields to the list and do away with the "promoted fields" altogether in favour of my own may of doing it with which would admittedly be worse but it would work. [EDIT]如果涉及到这一点,我可能不得不求助于(shudder) ,以某种形式在关闭时将特定字段写入列表,并完全放弃“提升字段”的代码,以支持我自己的意愿这样做虽然会更糟,但是会起作用。

The column mapping is probably working on field guids rather than field names - any fields and content types you create through the browser will be assigned random ids, which obviously won't help with the mapping. 列映射可能适用于字段指导而不是字段名称-通过浏览器创建的任何字段和内容类型都将被分配随机ID,这显然对映射没有帮助。

The best approach is probably to do everything manually with infopath publish, then export the forms library with solution generator. 最好的方法可能是通过infopath发布手动完成所有操作,然后使用解决方案生成器导出表单库。 That should give you something consistent you can bring into WSPBuilder and adjust as necessary. 那应该给您带来一致的东西,您可以将其带入WSPBuilder并根据需要进行调整。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM