locked
Best design for custom Entity with multiple yes/no field attributes? RRS feed

  • Question

  • Hi,

    I need to design a solution where I need an entity with approximately 10 attributes (yes/no fields).  Then I need ability to search for records based on any combination of those 10 attributes.  

    For example, I have an entity called Rainbow.  It has field (attribute) called Red that is yes/no, a Blue field that is yes/no, a Green field that is yes/no, etc., etc.

    Then I want to search based on any combination...Rainbows that are green and blue, but not red.  Rainbows that are blue and red but not green, etc...and return those results.  

    BTW - my preference is this be a product entity so I could search for products based on these multiple yes/no fields or attributes.  

    What is the best design/setup for this type of custom entity?  

    Thanks!

    Jerem

    Wednesday, June 25, 2014 2:54 AM

Answers

  • Yes, you could definitely do that using JavaScript to make REST calls (OData calls) in CRM and display the results in a grid. Just letting you know that this is possible directly via Advanced Find in CRM, unless you absolutely need to develop a custom form to show the data (based on your requirement).

    Admin QuikView Solution for CRM 2013


    • Edited by Anupam Bishui Wednesday, June 25, 2014 1:22 PM
    • Marked as answer by Higgins25 Wednesday, June 25, 2014 1:25 PM
    • Unmarked as answer by Higgins25 Wednesday, June 25, 2014 1:25 PM
    • Marked as answer by Higgins25 Wednesday, June 25, 2014 1:26 PM
    Wednesday, June 25, 2014 1:21 PM

All replies

  • Hi Jerem,

    Since you'd like to filter Products based on these 10 attributes, why not add them in the Product entity itself? You could then filter Products based on any combination of these 10 fields.


    Admin QuikView Solution for CRM 2013

    Wednesday, June 25, 2014 3:49 AM
  • Hi Jerem,

    From the example you have given I agree with Dynamotion; adding the 10 yes/no fields directly onto the product entity would most likely prove to be the best/easiest option.

    Would it be possible for you to give us your specific scenario though so we can see if there might be a better way to do it? The idea of a user having to enter in 10 separate yes/no fields every time they create that particular record sounds like it could make for a poor user experience on that particular entity.

    ~ Atomic Coder

    Wednesday, June 25, 2014 6:34 AM
  • Ok, thanks for the feedback.  I guess I need to research filters now because here's my actual requirement.  

    I need the ability to store and retrieve units of blood.  Each unit of blood will need to track if it's an O, A, AB, B, D, C, c, E, e, V, etc...these are properties related to blood groups.  I was thinking check boxes or yes/not fields for each.  

    Then I need ability to search for any combination of these antigens/blood groups.  But I'm not sure if filters would allow for that kind of flexibility/UX.  The ideal solution would be to allow the user to check which antigens they want and only those "products" be returned.  

    If I need an O unit with E, C, and V, then I would check each of these and my "filter" would return only these units that meet this combination.  Maybe filters would work, but I need to read up on how filters are built dynamically.  I'm new to CRM :-)

    Thanks!

    Jeremy

    Wednesday, June 25, 2014 12:25 PM
  • Hi Jeremy,

    If I am not wrong, blood group can either be A, AB, O, B or HH. Would it be possible for you to categorize these into a dropdown called Blood group and have your remaining properties like E, C, V, etc as checkboxes on Products. Now, when you're adding a Product, set the corresponding values and then you can use filter (Advanced Find in CRM) to filter specific Blood groups with specific properties.


    Admin QuikView Solution for CRM 2013

    Wednesday, June 25, 2014 12:35 PM
  • Technically there is an HH, but in this case we're storing units for transfusion medicine and HH is very rare!  :-)  Also, I'll need to be able to search for multiple blood groups at times, but overall I understand your recommendation.  I just need to research advanced find / filters more as I'm new to this concept functionality.  Thanks for your feedback/help!

    Wednesday, June 25, 2014 12:51 PM
  • Hi Jeremy,

    If you need to search for multiple blood groups at a time, say Group A with E and C; and say Group O with E and V; then you could easily club them in Advanced Find in Dynamics CRM like:

    Blood Group = A [AND] E = Yes [AND] C = Yes

    [OR]

    Blood Group = O [AND] E = Yes [AND] V = Yes

    Basically [OR] and [AND] in Advanced Find will allow you to create a filter similar to this. So, for the first case, you need to club A, E and C as [AND] and [OR] it with the group that holds O, E and V as [AND]. I hope I am not confusing you. :)


    Admin QuikView Solution for CRM 2013

    Wednesday, June 25, 2014 1:04 PM
  • I'm following you and yes, that makes sense.  I'm assuming it's possible to build that logic via javascript (or something) dynamically and then return the results?  I'm trying to compensate for doctors and nurses (apologies to all out there) and their learning curve for building an advanced find search query ;-).  Thinking if I build a custom form with the attributes and based on their selection criteria, I build the search (as you've described above) dynamically and return those results on the form in some grid or something?


     
    Wednesday, June 25, 2014 1:12 PM
  • Yes, you could definitely do that using JavaScript to make REST calls (OData calls) in CRM and display the results in a grid. Just letting you know that this is possible directly via Advanced Find in CRM, unless you absolutely need to develop a custom form to show the data (based on your requirement).

    Admin QuikView Solution for CRM 2013


    • Edited by Anupam Bishui Wednesday, June 25, 2014 1:22 PM
    • Marked as answer by Higgins25 Wednesday, June 25, 2014 1:25 PM
    • Unmarked as answer by Higgins25 Wednesday, June 25, 2014 1:25 PM
    • Marked as answer by Higgins25 Wednesday, June 25, 2014 1:26 PM
    Wednesday, June 25, 2014 1:21 PM
  • Excellent!  Thanks again!
    Wednesday, June 25, 2014 1:26 PM