Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. Setting an existing field as a lookup field via VisualStudio

Setting an existing field as a lookup field via VisualStudio

Scheduled Pinned Locked Moved SharePoint
questioncsharpsharepointsalesxml
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Ingo
    wrote on last edited by
    #1

    Well, I've got a list with contactpersons depending on a contenttype which extends the Contact-contenttype. I've got another list with customes (firms) which extends the basetype element. Both lists are generated via xml in a VisualStudio-Project, because it will be used in multiple websitecollections. Now I want to link the "company" field in the contactperson-list with the customer-list and lookup the values already established there. I'm able to generate a new field for example "My Company" and lookup the values in the customer-list, but when I try to set the already existing company-field as a lookup-field linked with the customer list, I get an error. The same when I leave xml and programm it in C#. Is it possible to do what I want? Perhaps not, because it's a SharePoint-Field and it's not designed to be a loopup-field. So do I have to generate a "new" company field, with a name like "My lookedup company-field from the customed-list, as it's not possible or I'm to stupid to link the existing customer-field"? Well that would be a solution but the name is sooooo long. ;) Regards, Ingo

    ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

    I 1 Reply Last reply
    0
    • I Ingo

      Well, I've got a list with contactpersons depending on a contenttype which extends the Contact-contenttype. I've got another list with customes (firms) which extends the basetype element. Both lists are generated via xml in a VisualStudio-Project, because it will be used in multiple websitecollections. Now I want to link the "company" field in the contactperson-list with the customer-list and lookup the values already established there. I'm able to generate a new field for example "My Company" and lookup the values in the customer-list, but when I try to set the already existing company-field as a lookup-field linked with the customer list, I get an error. The same when I leave xml and programm it in C#. Is it possible to do what I want? Perhaps not, because it's a SharePoint-Field and it's not designed to be a loopup-field. So do I have to generate a "new" company field, with a name like "My lookedup company-field from the customed-list, as it's not possible or I'm to stupid to link the existing customer-field"? Well that would be a solution but the name is sooooo long. ;) Regards, Ingo

      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      Uh, I've found the answer. When I use the webbrowser to do changes on the list I can't change the "Company"-field to a lookup-field, too. It's not envisaged to do that. So the answer is that I have to create a new field and (for example) hide the existing one. :sigh: With a little contemplation I would have sift it out before writing the question and perhaps I wouldn't have spend four hours on testing. But on the other side, perhaps someone will have the same question so I didn't deleted it and just answered it on myself. (I give it a five ;P )

      ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups