Answered by:
CRM2011: I create a filter lookup view for 'Add Existing User', but when I run it, why it still runs the default 'User Look up View'?

Question
-
Hi,
I create a new filter lookup view for 'Add Existing User' ribbon button using javascript, and change the User xml customization to point to right javascript. but when I run it, it still runs the default 'User Look up View'. I set a breakpoint in javascript. It seems it doesn't run my javascript. I use this method in my other custom entities, they all work. Is there any difference for User entity than others?
Any ideas? Thanks!
Thursday, November 3, 2011 3:46 PM
Answers
-
The problem has been solved. Just make sure the button's ID property is matching the RibbonDiffXml command definition you put.
- Marked as answer by howexg9 Friday, November 4, 2011 8:42 PM
Friday, November 4, 2011 8:42 PM
All replies
-
I don't think the debugger hit any of the ribbon or form event handler functions... I would use alert("") or something similar to check if the function is being called properly. I think, the javascript functions are executed with eval by the ribbonmanager so they can be handled properly in case an error occurs.
Can Bilgin
Blog CompuSightThursday, November 3, 2011 4:01 PM -
It seems still not running the code after I add alert("").Thursday, November 3, 2011 4:29 PM
-
The problem has been solved. Just make sure the button's ID property is matching the RibbonDiffXml command definition you put.
- Marked as answer by howexg9 Friday, November 4, 2011 8:42 PM
Friday, November 4, 2011 8:42 PM -
@howexg9: Can you please post the code to associate the filter lookup view to the Add existing button?Thursday, November 17, 2011 2:11 PM
-
Hi Sushma,
This is somthing that i had tried.
http://nishantrana.wordpress.com/2011/11/22/filtered-lookup-for-add-existing-button-in-crm-2011/
Please have a look at it.
Regards,
Nishant Rana
http://nishantrana.wordpress.com- Proposed as answer by Sushma999 Wednesday, November 23, 2011 7:06 PM
Tuesday, November 22, 2011 6:46 PM -
Hi Nishant,
Thank you so much for your reply. It's working great. But it's working only for 1:N relationship between Entities.
If there is N:N Relationship, current id is not sent to the plugin. I am trying to achieve this by sending a parameter to the plugin.
I am able to filter the lookup by this, but getting error after selecting the records.
Any Ideas??
Thanks,
Sushma.
Wednesday, November 23, 2011 7:38 PM -
I am able to filter the records in the look up with N:N Relationship by changing the command definition of the Associated button.
After selecting the records, I have written the code to relate the records to the parent form. But I am unable to refresh the parent form crmGrid.
Any one has any idea how to refresh the crmGrid of the parent form?
Thanks,
Sushma.
Monday, November 28, 2011 3:47 PM -
Hi Sushma,
Check this out,
This works like a charm for n:n relationship.
http://danielcai.blogspot.com/2011/12/filtered-lookup-for-existing-button-of.html
Regards,
Nishant Rana
http://nishantrana.wordpress.com- Proposed as answer by Sushma999 Thursday, February 23, 2012 8:53 PM
Saturday, December 3, 2011 7:14 AM