1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Adding custom profile field with foreign key to custom table in the database

Adding custom profile field with foreign key to custom table in the database

2 posts, 0 answered
  1. Or Dagmi
    Or Dagmi avatar
    4 posts
    Registered:
    07 Apr 2010
    17 Jul 2011
    Link to this post
    Hello,
    I've created a table in my database called Offices, it's got the office ID , Name and location details
    Now, I want to create a relation between one type of users ("OfficeStaffProfile") to the office.
    I've seen that i can create custom profile fields (of basic types), but how can i create a foreign key field? so i could choose from the list of given offices?

    Thanks,
    Or.
  2. Pavel Iliev
    Pavel Iliev avatar
    140 posts
    Registered:
    18 Jul 2016
    21 Jul 2011
    Link to this post
    Hi Or,

    Unfortunately we don't provide such functionality out of the box, there are different approaches that you could achieve this - one is to have your one fieldcontrol that reads the data and you store in your item just the selected id or IDs. This I think would be the easiest approach.


    Greetings,
    Pavel
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered