Associate one lookup to another crm 2011

Hi everyone

I am trying to display a certain view in a lookup depending on what value is in another entity lookup.

ie.

In "Case Entity", I have a lookup field called "Worktype"
I have an Entity called "Link from Worktype to Time Activity", this has 2 lookup fields in there for many to many relationship, from Time Activity and Worktype.
I have an entity/activity called Time Spent that a user create a new record everytime they work on a case.
I have views that returns all Time Activity, that is linked to "Worktype" of the "Case"

In Time Spent Entity, I have a mapping to "Case", and a lookup field to Time Activity. I there anyway, if so how, to only display (when they click the lookup field) the "Time Activity View" needed for the "Worktype" of the "Case" without the user having to manually dropdown the list and select.

I hope the above makes sense.

Any help would be very much appreciated.

Baker
LVL 1
BakersvilleAsked:
Who is Participating?
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Hi,

You have to work on javascript to solve this. You can use addCustomView() method from Xrm.

Please check below solution for reference.
http://www.magnetismsolutions.com/blog/zhenyu-wangs-blog/2012/04/17/filtered_lookup_view_in_dynamics_crm_2011_using_javascript
0
 
BakersvilleAuthor Commented:
Hi Rikin

Thank ever so much for this.

This does look like a great solution, however, the GUID I am after is from another lookup in an entity within the lookup entity linked on the entity, unless there is a way mapping it to the top entity from the lookup second entity.

I really hope this makes sense.

Baker
0
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Hi,

You can get the GUID from related entity as well. Try to get the GUID from the retrieve method and you can move ahead.
0
 
BakersvilleAuthor Commented:
Got it working thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.