Oct 21, 2011 at 12:26 PM
Edited Oct 21, 2011 at 12:27 PM
I am using SPLookupAddNew and SPCascadeDropdowns in a list and both work just fine for me but i have a question about how i should tackle something particular I wish to accomplish.
I have a list named ClientContactConnections which i use to simulate a many-to-many relationship between clients and contacts. In that list i have created three lookup columns
- One named "Client" which looks up the "Clients" list.
- One named "Contact type" which looks op the "TypeOfContacts" list.
- One named "Contact" which looks up the "Contacts" list. I'm using SPCascadeDropdowns for the selection of different type of contacts. Selecting a Contact type gives me different contact options than when using another Contact type.
A user can select a client. Afterwards, the user selects a contact type he want the client to make a connection with. Last, the contact is selected. Depending on the value of contact type the contacts column values are diplayed. I'm using SPCascadeDropdowns
The "Contacts" list is a list which contains several Content Types. One for every type of contact (the CT's have the same names as the values in the TypeOfContacts list). That way users can easily add items according to wish since every
contact type has diffent attributes. In addion, a hidden lookup column named "ContactType" is used in every content type. when a user adds an item, a workflow starts which detects the content type. It then provides the "ContactType" column with
a value. Using this construction i can use it for SPCascadeDropdowns while using content types instead of a field choice for the type of contact when adding a new contact. Confusing? I hope not!
Now i'd like to use SPLookupAddNew for adding a new contact from the connection list. The thing is, it points to the default content type of the Contacts list when clicking "add new item".
My question is: What would be the best way accomplish to be able to choose a type of contact (Content type) when adding a new item in the "Contacts" list.