Hi, I created a relationship attribute (Many-to-1) in a custom entity, so it
will be a lookup field in the form.
Now, I noticed that I can only use this lookup attribute once in a form, but
the requirement is to use the same
lookup field in the same form twice, first is for the Contact text field
(lookup) and second, is for the Assistant text field (lookup),
which both fields uses the Contact entity.
Any ideas?
On May 9, 11:47 pm, "Benjamin Fallar III" <fal
@pldtdsl.net> wrote:
> Hi, I created a relationship attribute (Many-to-1) in a custom entity, so it
> will be a lookup field in the form.
> Now, I noticed that I can only use this lookup attribute once in a form, but
> the requirement is to use the same
> lookup field in the same form twice, first is for the Contact text field
> (lookup) and second, is for the Assistant text field (lookup),
> which both fields uses the Contact entity.
> Any ideas?
Unfortunately there is no way to link to the same entity more than
once per form/CRM entity. HOWEVER... here are some workarounds:
1. You can use a go-between entity to do your work for you. E.g.
Rather than going A-C, you can go A-B-C, where B is the intermediate
entity that links to both entities for you and C is the Contact
entity. That way on your form you will have a link from A-C (custom
entity to Contact) and A-B (custom entity to lookup entity). For
relative ease, you can make b.new_name = c.new_name, so that it looks
the same when you see the two on the form. Assuming your C is the
Assistant, you could put a callout on Contact that creates a record in
entity B on post-create, which helps maintain data integrity and
prevents double entry.
2. You can store the necessary values within CRM within text fields
and use an iFrame to hold a custom .NET application that replicates
the two lookup fields on the form. However, no actual relationship
will be created through MS CRM.
There was a similar question in the Customisation exam for MS CRM 3.0
(MBS-422). In their question they ask for a similar question with
links to 3 users. The solutions proposed for that particular question
were something along the lines of:
1. Store the names of the users in their particular roles as text
fields.
2. Same as #2 above.
3. Create a task in activities for each user, and link event to
activities (in a roundabout way, this is the same as my suggested #1).
As you can see, this is pretty much the Microsoft supported way to do
things. The basic idea was that you cannot make a direct relationship
through CRM to the same entity (e.g. Contact) twice from a single
record, regardless of whether or not it is a system or custom entity.
Kris Rhodes
----
MS CRM Certified (Installation & Configuration, Customisation)
CRM 3.0/VB.NET 1.1 Developer
Quantum Business Technology
Perth West Australia
Blog: http://rhodeskc.wordpress.com
This information is intended to be advice and advice only.