Administrator Approved Form not updating Content Type Columns - InfoPath Dev
in

InfoPath Dev

Administrator Approved Form not updating Content Type Columns

Last post 03-31-2010 07:07 AM by sonisick. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-03-2010 01:10 PM

    Administrator Approved Form not updating Content Type Columns

    So, I've got a published, administrator approved template. The code works, I can update the form and the changes I make in code and on the form both work fine after the update. My problem is that I've added mapped columns that are no longer being tied to fields on the form. Does anyone know how I can get these fields to update?
  • 03-03-2010 01:25 PM In reply to

    Re: Administrator Approved Form not updating Content Type Columns

    Did you try to re-link the forms in the library?

  • 03-26-2010 10:19 AM In reply to

    Re: Administrator Approved Form not updating Content Type Columns

     (This discussions assumes managed code and contenttypes attached to the form library)

    I've had a lot of problems with columns being updated --also problems with column mappings (This can get crucial when you have workflows dependent on the name staying the same. To get them to work I've had to take some drastic measure. For my infopath projects I first a feature with site columns (I use a named group to be able to locate the columns quickly) and install it on the server. Next in design mode I save my form as source files. Next I exit infopath and go into my source files directory and edit the xsf file. I find where my columns are. Get the guid and find where it's mapped and substitute my guids from my site columns.

    Next I reconstitute and InfoPath Form by double-clicking on the xsf and save it to another name.  Then I publish it.  I've been working with alot of managed code lately so I use a batch file of stsadm commands.  When this is done, I know my columns map to my site columns.

    Slightly more of a problem to add new columns. 

    I save all my InfoPath forms to a temporary directory and delete them from the library. Since I'm using a directory with contenttypes, I delete the contenttype from form library where it's attached. 

    (The forms have to be gone to delete the contenttype from the library. Next I delete the ContentType.)

     Then I redeploy my site feature. 

    I deactive and activate the Site Collections Feature for my site columns. You should be able to see your added columns under Site Columns and the group you used at this point.

    Also the Contenttype (assuming your using managed code) should be back. You can check it at Site Settings=>Galleries =>ContentTypes

    Next I reattach the contenttype to my form library and reimport my documents.

    Let me know if this helps--It not fun

     

    Here's a script for publishing

    prompt $D  $T$_$P$G
    cd "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin"
    stsadm -o deactivateformtemplate -url http://portal/sites/ds -filename "C:\Documents and Settings\onisicks\Desktop\INFOPATH FORMS\MDA Announcements\Published\MDAAnnouncements.xsn"

    stsadm -o execadmsvcjobs
    stsadm -o removeformtemplate -filename "C:\Documents and Settings\onisicks\Desktop\INFOPATH FORMS\MDA Announcements\Published\MDAAnnouncements.xsn"

    stsadm -o execadmsvcjobs
    stsadm -o retractsolution -name form-mdaannouncements.wsp -immediate

    stsadm -o execadmsvcjobs
    stsadm -o deletesolution -name form-mdaannouncements.wsp

    stsadm -o execadmsvcjobs
    stsadm -o verifyformtemplate -filename "C:\Documents and Settings\onisicks\Desktop\INFOPATH FORMS\MDA Announcements\Published\MDAAnnouncements.xsn"

    stsadm -o execadmsvcjobs
    stsadm -o uploadformtemplate -filename "C:\Documents and Settings\onisicks\Desktop\INFOPATH FORMS\MDA Announcements\Published\MDAAnnouncements.xsn"

    stsadm -o execadmsvcjobs
    stsadm -o activateformtemplate -url http://portal/sites/ds -filename "C:\Documents and Settings\onisicks\Desktop\INFOPATH FORMS\MDA Announcements\Published\MDAAnnouncements.xsn"

    stsadm -o execadmsvcjobs

    pause

     

    obviously you will have a different site and different Document.  I use WSPBuilder for Site Features. It helps if you pray.

    Hope this helps

     

     


     

     

  • 03-28-2010 10:02 AM In reply to

    Re: Administrator Approved Form not updating Content Type Columns

    Hi,

    I have made the experinece that in most cases it´s enough to deactive the form feature in the site collection and immediately activate the feature again.

    Beside this I have made the experience that sometimes the promoted fields are "double" assigned so you have two columns with the same name in your form library. In this case there´s a workaround which is best described here:

    http://www.delphi-ts.com/blogs/lozzi/post/2009/06/03/Duplicate-site-columns-in-MOSS-from-InfoPath-Forms.aspx

    Regards,

    Karsten
  • 03-31-2010 07:07 AM In reply to

    Re: Administrator Approved Form not updating Content Type Columns

    Essentially your solution and mine both deal with the duplicated columns and editing the xsf file. In the first case you map to columns already in existence--again through the xsf. In my case I create new site columns and map these.

    I agree SharePoint 2007 Manager is a great tool in either case.

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.