- How to add "Add existing contact" in a custom entity
- Posted by Benjsoft on July 9th, 2006
Hi, I created a custom entity called ClassSchedule which has a parental,
1-Many relationship with Contact. Now, when I add new ClassSchedule, in the
form, and click the Contact link, I want to have a button "Add Existing
Contact" instead of just adding new contact in my ClassSchedule. Please
advise on how to go about it.
Thanks!
- Posted by Jim Wang on July 10th, 2006
You need to set up a 1-to-Many Relationship in the Contact entity.
Related Entity: ClassSchedule
Type: lookup
Type of Behavior: Referential
And then add a new field in ClassSchedule MainForm, select the above filed
which you created in the Contact entity.
Publish it.
--
Jim Wang
Business Solutions Engineer
MCSE, MCDBA, Microsoft CRM Professional
"Benjsoft" wrote:
- Posted by Benjsoft on July 10th, 2006
Hi Jim,
Thanks for the reply.
What I'm trying to accomplish to enable to add many existing contacts in my
custom entity called ClassSchedules. I already created the 1-to-Many
relationship where Contact is related entity, thus in my ClassSchedule Main
form, on the navigation pane, Contacts is listed. When I clicked the Contacts
in my ClassSchedule form, only "New Contact" appears in the toolbar. I would
like to inquire how to retrieve existing contacts in this view, instead of
creating new contacts.
Hope for your immediate reply.
"Jim Wang" wrote:
- Posted by Jim Wang on July 10th, 2006
Hi,
Please make sure the following things are setup correctly:
1. Set up a 1-to-Many Relationship in the Contact entity.
2. Related Entity is: ClassSchedule
3. Type is: lookup
4. Type of Behavior is: Referential, not parental.
Also, what's crm role you are using? is it Administrator role?
--
Jim Wang
Business Solutions Engineer
MCSE, MCDBA, Microsoft CRM Professional
United Kingdom
"Benjsoft" wrote:
- Posted by Benjsoft on July 10th, 2006
Yes I'm using Administrator.
I did the steps. When I add the field in ClassSchedule Main form, it just
allowed me to pick an existing contact in my form. A single contact only.
Ok,what I wanted to accomplish is when I clicked the Contact link in the
navigation pane of my ClassSchedule form, I want to add existing contact, not
to create a new contact.
"Jim Wang" wrote:
- Posted by Jim Wang on July 10th, 2006
You need to develop it to add a button on.
Alternatively, if you want, you can give each contact a ClassSchedule value.
--
Jim Wang
Business Solutions Engineer
MCSE, MCDBA, Microsoft CRM Professional
United Kingdom
"Benjsoft" wrote:
- Posted by Shane on July 10th, 2006
What Jim is saying is correct. CRM was designed to create a parent child
record relationship for copying, not reassignment "to" a new parent. But
please read on.
It was also designed so that you can open the parent record and create a new
child record. In your example, open up Class Schedule, press contacts, press
New Contact.
But I understand this is not what you want to do. Instead, you want to
press a button that says "Add Existing Contact", then see a list of contacts
that are already entered into CRM.
CRM does not do this and was not designed to be able to. They have made it
possible in limited cases like setting up pricelists but they have yet to
make it a customizable feature. Instead, as Jim suggested, you can only have
a developer write code to do that. But this may not be what you truely want.
Please read on.
Alternativly, you would have to have your users navigate to the contact
first and assign them to a Schedule.
This brings up my final point: You may not wish to assign a contact to one
or none Class Schedules. You may actually what to assign a contact to none
or many schdues as well have Schedules assign to none or many contacts. In
such a case you need an extra enttity. You need Class Schedule Entity, Seat,
and Contact. The seat will be a child of the Schedule Entity (parent). The
Seat will also be a child of the Contact Enttity (restrict delete cascade
none). In this way you can access seats from either the Class Schedule or
the Contact. On the Seat Entity you will need to fields, the Class Schedule
and the Contact.
With this setup you can access the contact record and start assigning them
to different class schedules by going to the Seats enttity and pressing new
and filling in the class lookup.
You can also access the class schedule record and start assigning seats to
contacts by gointo the the Seats entitty and pressing new and filling int he
contact lookup.
Key is this: A class schedule is not a seat and not a contact. A contact is
not a seat and not class schedule, and a seat is not class schedule and not a
contact. But they all are interrealted and as three entitites, CRM is
perfectly capabile of data storage.
- Posted by Benjsoft on July 11th, 2006
Thanks Shane, I will look into this 
Thanks too Jim!
"Shane" wrote: