Ask a questionAsk a question
 

Proposed AnswerBDC field cannot save on Custom List Form

  • Thursday, September 03, 2009 6:03 AMchengary Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    I'm having a problem with a Sharepoint Business Data Catalog, I have a List which are connected by BDC to a SQL field/table, and with standard sharepoint Forms it all works fine, I can lookup data in BDC and it saves correctly.

    However, I need to create a Custom List Form for New Items on this list, and whenever I do this - the BDC works for lookup, but it doesnt save the data in the List when the item is created ?
    (All normal fields save, but the BDC field is just empty on the new Item)

    Anyone got any bright ideas? Cause I'm running out.

All Replies

  • Monday, September 14, 2009 8:05 PMBrian Bedard Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    You need to populate the identifier field and any related fields to save properly.  It's important you use the correct internal field name when accessing the item's field values.  If you don't save the related fields, they won't automagically populate for you.  This is a step done internally by OTB forms, but when you customize a form, your code needs to also do this step.
    • Proposed As Answer byBrian Bedard Tuesday, October 20, 2009 1:37 PM
    •  
  • Tuesday, October 20, 2009 8:25 AMRavabelli Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You need to populate the identifier field and any related fields to save properly.  It's important you use the correct internal field name when accessing the item's field values.  If you don't save the related fields, they won't automagically populate for you.  This is a step done internally by OTB forms, but when you customize a form, your code needs to also do this step.

    This has been annoying me too.

    Thanks for the explanation Brian. Is there any resource you (or anyone else) knows of where this is explained?
    • Edited byRavabelli Tuesday, October 20, 2009 4:14 PM
    •  
  • Tuesday, October 20, 2009 1:36 PMBrian Bedard Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Nope learned it the HARD way :) Now that we have BCS, everything BDC will be better :)
  • Wednesday, November 04, 2009 3:27 PMDaveLee212 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Just had a read about BCS, sounds interesting...

    I'm having exactly the same problem but I can't understand how to fix it.  Brian, could you explain how you go about populating the identifier and related fields for this to work properly?  I'm using a Custom List Form for entering new items and my fields that looks up against a BDC source doesn't save.  I've not used any code to put this together though, done it all through Sharepoint Designer.

    thanks in advance!

    Dave

  • Wednesday, November 04, 2009 6:40 PMCarl E. Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Check this kb article and patch.
    It fixes the BDC in custom list forms issue.

    kb973409

    Get the hotfix and install over your MOSS with SP2
    works for me.
    • Proposed As Answer byDaveLee212 Thursday, November 05, 2009 1:08 AM
    •  
  • Thursday, November 05, 2009 1:08 AMDaveLee212 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Carl

    Thanks for the tip!  A cumulative update was made available on 27th October so, seeing as it's out of hours here, I've just finished installed those on the servers in our farm.

    I've gone back to my previously unworking custom form and it's working perfectly now!

    thanks!

    DAve