locked
Want to modify look Up records in Order Entity RRS feed

  • Question

  • Hello,

    I want to modify look up in order entity, especially in "customer" attribute. if you click look up button then show"look up records -- webpage dialog", i want in look for's combobox/picklist (account and contact) only show record from account only, not show from contact. i have tried modify in customization for order, contact but not find the way. can i do that? cause it's system relationship.

    Thanks in advance for your thoughs
    regards,

    Glo.


    Wednesday, March 18, 2009 6:55 AM

Answers

  • try this in form load, and you should be OK.

    crmForm.all.<your field>.setAttribute("lookuptypes","2");

    where 2 = contact, 1 = account, 3 = opportunity etc......

    If you would restrict to multiple, you would have:
    crmForm.all.<your field>.setAttribute("lookuptypes","1,2");


    If you want to set default (relevant when multiple) you would add this:
    crmForm.all.<your field>.setAttribute("defaulttype","2");

    Wednesday, March 18, 2009 7:28 AM

All replies

  • You cannot limit to only be one or the other since this is a system field/attribute.  However, you can make it so that if users click on the lookup button it defaults to the entity that you want it to.  Check out this blog post and see if it helps you get closer to accomplishing what you want.

    http://dmcrm.blogspot.com/2007/09/set-regarding-lookup-default-entity.html

    Outside of that, filtered lookups would be the only other way to go.  Stunnware has a product that can accomplish this but buying the whole product for one field might be overkill.  Check out www.stunnware.com for more info on that.

    Hopefully one of those options points you in the right direction.

    Fronk
    http://dmcrm.blogspot.com
    Wednesday, March 18, 2009 7:23 AM
  • try this in form load, and you should be OK.

    crmForm.all.<your field>.setAttribute("lookuptypes","2");

    where 2 = contact, 1 = account, 3 = opportunity etc......

    If you would restrict to multiple, you would have:
    crmForm.all.<your field>.setAttribute("lookuptypes","1,2");


    If you want to set default (relevant when multiple) you would add this:
    crmForm.all.<your field>.setAttribute("defaulttype","2");

    Wednesday, March 18, 2009 7:28 AM
  • Hello morten and fronk,

    yeah,,... thanks you so much for your help ..its work :)
    for more clearly, where source i can know about
    "2 = contact, 1 = account, 3 = opportunity etc......"?

    thanks..

    regards,

    Glo

    Wednesday, March 18, 2009 7:45 AM