Tuesday, 6 September 2016

Utilize Custom Action to Help Filtering The Lookup View in CRM Form

Overview

Sometimes in our project, we have requirement to filter lookup based on some conditions and it can be achieved using addCustomView or addCustomFilter function.

And sometimes it is just not too easy to do it in Javascript or the complex fetch xml, so in my blog I just want to share another method to get the filtered result same as you wanted, that is using Javascript + Custom Action!

Detail

Following my previous post: http://missdynamicscrm.blogspot.sg/2014/08/crm-2013-using-addcustomfilter-to-get-filtered-lookup-field-based-on-linked-entity.html

So, considering you have this filter:
image

To get the result as per expected, you can use Custom Action.

Steps:

1. You need to create a custom action that give you output, either STRING or ENTITYCOLLECTION

2. Inside the custom action code, if you want to return string, you can use comma delimited concept, or using | as delimiter, or you can just return the Final XML Filter already.

If you use EntityCollection, you might need to parse it again.

3. Then create a javascript that can call the Custom Action, you can use this method for easy way:
http://www.magnetismsolutions.com/blog/paulnieuwelaar/2015/08/12/Call-Action-in-CRM-2015-Easily-from-JavaScript-Library

4. Then you get the result as parameter, you can just set it to the filter = “the Result” (if you use Final XML Filter as the Output) or you parse the GUID if you use the comma or | delimited concept, or if you use EntityCollection then you need to parse it back.

5. See the result

Basically, you just need to get this result:

image

Either you just easily using String as output or other method it is up to u.

But the point here is we can use Custom Action for solving complex filtering and remember that we can use impersonation also to get the data you want if it is related to the other entities as well, imagine if we also need to have multiple entities involved then it might be easier if we use Custom Action as we just replace the DLL if there is any other changes using Plugin Registration Tool.

Hope this helps!

Thanks,
Aileen

48 comments:

  1. Very Nice Post Aileen,I have read the method to get the filtered result with a different method by using Javascript + Custom Action. It is really very helpful contact for .MS Dynamic CRM consultant services.

    ReplyDelete
  2. I am filtering the Source Campaign lookup based on Optionset Originating Lead
    Event:-OnChange
    Field:-Originating Lead
    Condition 1:If originating Lead value "Employee- Frank Hooper" then show all campaigns in lookup.
    Condition 2:For all other Originating Lead value it showed specific Campaigns in lookup.
    Problem:- if originating lead is "Employee- Frank Hooper" it search all campaigns that is good and if change originating lead other
    than"Employee- Frank Hooper" it also search well but when i go again to option set value"Employee- Frank Hooper" now it doesn't show any value.
    so what is reason second time it show unexpected behaviour

    ReplyDelete
  3. good article. I like to read this post because I met so many new facts about it actually. Thanks a lot. Lead Capture Software

    ReplyDelete
  4. Hello! Thank you so much for posting this small tutorial. I think it will be useful for many people who are interested in learning ms dynamics features and such tips like how to utilize Custom Action to Help Filtering The Lookup View in CRM Form.

    ReplyDelete
  5. Your post is very useful for all SAP learners. Thanks for providing such a great post...
    SAP FICO Online Training | SAP FSCM Online Training in India

    ReplyDelete
  6. This post is much helpful for us. This is really very massive value to all the readers and it will be the only reason for the post to get popular with great authority.
    IOS Training in Chennai

    ReplyDelete
  7. Thank you for sharing such a nice and interesting blog with us. I have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information. I would like to suggest your blog in my dude circle.
    SEO Company in Chennai

    ReplyDelete
  8. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command .
    Cat Coaching in Chennai

    ReplyDelete
  9. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us
    Digital Marketing Company in India

    ReplyDelete
  10. wonderful information, I had come to know about your blog from my friend nandu , hyderaba.
    i have read atleast 7 posts of yours by now, and let me tell you, your website gives the
    best and the most interesting information. This is just the kind of information that i had
    been looking for, i'm already your rss reader now and i would regularly watch out for the new posts

    Oracle Fusion HCM Training

    ReplyDelete
  11. Its a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much

    Personal Installment Loans
    Payday Cash Advance loan
    Title Car loan
    Cash Advance Loan

    ReplyDelete
  12. i really like this blog.And i got more information's from this blog.thanks for sharing!!!!Digital Marketing Company in Chennai

    ReplyDelete
  13. This blog is having the good information. Got a creative work and this is very different one. We have to develop our creativity mind. This blog helps for this. Thank you for this blog. This is very interesting and useful.

    Self Employment Tax
    Tax Preparation Services
    Tax Accountant
    Tax Consultant
    Tax Advisor

    ReplyDelete
  14. Microsoft Dynamics CRM Implementation | USA | UK | CANADA| INDIA
    Microsoft Dynamics CRM is a platform created to provide organizations with tools to sell smarter, sell efficiently and productively, and heed everywhere. The solution allows a difference of features including social acumen, business knowledge, and fertility with One Microsoft solutions. Customers can prefer how Microsoft Dynamics CRM is used in a way that fits their business: in the cloud, on-premises, or with a cross combination.

    The customer can still obtain the method even when offline.
    Strong integration with Microsoft products.
    Many dashboards.
    Integrated marketing and self-regulation tools.
    Broad integration with third-party apps and methods.
    https://www.aryvartcrm.com/microsoft-dynamics-crm/

    ReplyDelete
  15. wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much
    Online Tax Services
    Tax Professional
    Online Tax Preparation
    Tax Advisor


    ReplyDelete
  16. It's a wonderful post and very helpful, thanks for all this information. You are including better information regarding this topic in an effective way.Thank you so much.

    Allergy Medicines
    Ayurvedic Medicine For Immunity
    Hyperpigmentation cream
    Viral Fever Medicines

    ReplyDelete
  17. It’s really amazing that we can record what our visitors do on our site. Thanks for sharing this awesome guide. I’m happy that I came across with your site this article is on point,thanks again and have a great day. Keep update more information..

    Selenium Training in Chennai


    ReplyDelete
  18. It is really a great and useful piece of info. I’m glad that you shared this helpful info with us. Please keep us informed like this. Thank you for sharing.
    Web design company in chennai

    ReplyDelete
  19. Very amazing blog on a fresh new topic. I am definitely going to use the information provided in this blog because of its novel and fresh. Thanks for sharing such valuable information with everyone.
    Web development company in bangalore
    Outsource magento ecommerce services india
    ECommerce Website developers in bangalore

    ReplyDelete
  20. What you have written in this post is exactly what I have experience when I first started my blog.I’m happy that I came across with your site this article is on point,thanks again and have a great day.Keep update more information.
    Software Testing Training in Chennai
    SEO Training in Chennai
    Informatica Training in Chennai
    Digital Marketing Training in Chennai

    ReplyDelete
  21. Its really an Excellent post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog. Thanks for sharing....

    Carwash in omr
    usedcars in omr
    automotors in omr
    car accessories in omr
    secondhand car in omr

    ReplyDelete
  22. Thanks for sharing informative blog with us.

    CRM Implementation

    ReplyDelete
  23. Sudah seru, odds nya menguntungkan lagi!!. itulah permainan sabung ayam online di sabung ayam
    Dapatkan informasi penting dalam dunia sabung ayam di website bawah ini
    http://agenayamterpercaya.blogspot.com/2018/07/langkah-untuk-melatih-sabung-ayam.html

    ReplyDelete
  24. هل تبحث عن شركة متخصصة فى خدمات التنظيف بالطائف بافضل المعدات والسوائل وثقة تمة فى العمل ودقة فى النتائج كل هذه المميزت توفرها شركة الخليج الشركة الافضل والامثل فى الخدمات المنزلية بالطائف وبما اننا الشركة الافضل والامثل بدون منافس سوف نسعى لتوفر افضل الخدمات باقل تكلفة وبقدر كبير من الاهتمام والدقة عزيزى اينما كنت فى اى منطقة ا وحى تابع لمدينة الطائف اتصل بنا وسوف نصلك فى الحال شركة الخليج للخدمات المنزلية شركة تنظيف منازل بالطائف
    شركة تنظيف فلل بالطائف
    شركة تنظيف خزانات بالطائف
    شركة تسليك مجارى بالطائف
    شركة رش مبيدات بالطائف
    شركة مكافحة نمل ابيض بالطائف
    شركة مكافحة حشرات بالطائف
    شركة عزل اسطح بالطائف
    شركة عزل خزانات بالطائف

    ReplyDelete

  25. Dear customer All of us suffer from problems at home difficult to solve and may pose a great danger to your life and life of those you love such as harmful insects dangerous, which threaten human life and the transmission of diseases and cause a lot of physical problems So provided theAl Manarah Company has all kinds of insects
    شركة تنظيف منازل بالرياض
    شركة تنظيف سجاد بالرياض
    شركة تنظيف بالرياض
    شركة تنظيف مجالس بارياض
    شركة مكافحة حشرات بالرياض
    شركة تنظيف مكيفات بالرياض

    ReplyDelete
  26. شركة رش مبيدات بالخبر
    شركة رش مبيدات بالقطيف
    شركة المناره تمتلك عمالة محترفة لتنظيف وتعقيم خزانات المياه بجميع انواع سواء بلاستيك او خراسنية
    عميلي العزيز تقدم لقم شركه المنارة انضف تنظيف الخزنات المياه با دمام
    في هي شركه المنارة تقوم بي عمل مميز بل اخر
    شركة تنظيف خزانات بالخبر
    شركة تنظيف خزانات بالقطيف
    عزيزي العميل نعلم ان وقتك ثمين فنقدم لك افضل شركة تنظيف
    خدمات التنظيف من الخدمات المهمة التي يجب القيام بها من حين لاخر
    نقوم بتنظيف الشقق والفلل والمنازل
    بافضل الادوات والاجهزة الحديثة
    نقوم بتنظيف المجالس والموكيت والستائر وجميع المفروشات
    تقدم لقم شركه المنارة العرود القوي ول مل المميز
    شركة تنظيف بالخبر
    شركة تنظيف بالقطيف
    عزيزي العميل للاطمئنان علي منزلك يجب فحصه من الحين للاخر
    لضمان عدم وجود تسربات مياه تقضي علي اساس المنزل
    تقم لقم شركه المنارة
    لفريق العمل المميز في ازي حولت تتمان علي منزلك بي سحا وي سلامه
    فقوم بران علي شركة المنارة
    شركة كشف تسربات المياه بالخبر
    شركة كشف تسربات المياه بالقطيف
    انسداد المجاري من المشاكل الخطيرة التي تواجهك عزيز العميل حيث تتكاثر الجراثيم والحشرات والرائحة الكريهه
    فشركة المناره تمتلك سيارات تسليك المجاري وشفط وتنظيف البيارات تاتيك باقصي سرعه
    وي افضل الاجهزة الحديثه في هي شركة المنارة
    افضل شركه في دمام وتقوم بل عمل المميز
    شركة تسليك مجاري بالخبر
    شركة تسليك مجاري بالقطيف
    عميلي العزيز تقدم لقم شركه المنارة العمل المميز في ادا اتسليك المجاري فل قطبف فل الخبر فل الجبلي فل ابها
    فل بيشا فل خميس مشيط ول لخي بما ياعني اشوارع وطروق في ارواح ول ما المعكعكا
    شركة المنارة ارخص شركا فل القطيف بما ياعني ان
    شركه المنارة هي ارخص شركه في دمام

    ReplyDelete

  27. شركة مجموعة زهور العاصمة أفضل شركة تقدم كافة الخدمات المنزلية من عزل أسطح وكشف تسربات المياه ورش المبيدات وتسليك المجاري وتنظيف البيارات في كافة مدن المملكة العربية السعودية والجميع لا يجد شركات متخصصة ومعتمدة للثقة بها والقيام بالخدمة على اعلى مستوى ولاكن شركة مجموعة زهور العاصمة هي أفضل شركة متخصصة في كافة الخدمات المنزلية شركة عزل اسطح بالمزاحمية
    شركة عزل خزانات بالمزاحمية
    شركة كشف تسربات المياه بالمزاحمية
    شركة تسليك مجاري بالمزاحمية
    شركة رش مبيدات بالمزاحمية
    شركة عزل خزانات بالقويعية
    شركة عزل اسطح بالقويعية
    شركة عزل كشف تسربات المياه بالقويعية
    شركة مكافحة حشرات بالقويعية






    ReplyDelete
  28. I am happy that I found your post while searching for informative posts. It is very useful.Thanks for sharing.
    CRM System in UK

    ReplyDelete
  29. "Customized CRM Software Solution" and "CRM Applications Development Services India For Your Business - Hire the expert custom CRM software developers for your crucial projects. Our highly motivated professionals are ready to serve you 24*7.

    ReplyDelete
  30. A nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
    Asset Management Software
    Asset Tracking Software
    Asset Management Software India

    ReplyDelete
  31. Nice blog, very informative..!!
    If you’re using Dynamics in your business, you don’t need to worry about switching to a different vendor. But you’ll probably want to start thinking about how you’re going to take advantage of the new approach. Here you can know more MS Dynamics Development Services In USA

    ReplyDelete
  32. It's a wonderful post and very helpful, thanks for all this information.

    customized crm solution

    ReplyDelete

  33. As you have now understood the usage of ‘Record and Playback’ tool, the following are the different posts using which you can explore the functioning of ‘Selenium IDE’
    selenium Training in chennai

    ReplyDelete
  34. A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one.I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts read this.
    python course in pune
    python course in chennai
    python Training in Bangalore

    ReplyDelete
  35. I am really very happy to find this particular site. I just wanted to say thank you for this huge read!! I absolutely enjoying every petite bit of it and I have you bookmarked to test out new substance you post.
    python course in pune
    python course in chennai
    python Training in Bangalore

    ReplyDelete

My Name is..