locked
how to add Contact lookup field on the form by using javascript in CRM 4.0 ? RRS feed

  • Question

  • Hello 

    we need't add Contact lookup field dynamically, 

    i want to know, is there some standard way to add it? 

    if not, is is possible to add Contact lookup field dynamically? 

     

    any ideas will be appreciated.

    Tuesday, March 15, 2011 9:20 AM

Answers

  • Thanks to all 

     

    i have solved by myself, 

    we can copy existing lookup field

    and rename its id, there are two ids should be replaced. 

    then it's OK. 

     

    Thanks again


    • Marked as answer by nevernet Wednesday, March 23, 2011 4:21 AM
    Wednesday, March 23, 2011 4:20 AM

All replies

  • Hello nevernet,

    You have 2 possibilities:

    1) Create the lookup field and hide it / show it in runtime

    2) Dynamically alter the form structure (layoutXML) to support a dynamic lookup field and save the data from code-behind in a new uniqueidentifier column in SQL.


    Cornel Croitoriu - Senior Software Developer & Entrepreneur

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    CWS SoftwareBiz-Forward.comCroitoriu.NET

    Tuesday, March 15, 2011 11:00 AM
  • I would say a lookup type Iframe application that could be manipulated would be a good option.
    Jamie Miley
    http://mileyja.blogspot.com
    LinkedIn Profile
    Tuesday, March 15, 2011 1:24 PM
    Moderator
  • Hello Cornel Croitoriu

    could you provide more details?

    1) yes , we can create ONE 'Lookup' field,  but we don't know how many lookup field will be added by User. 

    2) where i can find 'layoutXML'?  what's the SQL?

     

    Thanks

    Wednesday, March 16, 2011 2:13 AM
  • Hello Jamie Miley

    i am not understand your mean exactly. 

    did you mean that create a customize iframe application ,and add lookup field on this customize page? 

     

    but how to add standard lookup field on customize *.aspx page? 

     

    thanks.

    Wednesday, March 16, 2011 2:15 AM
  • Hello 

     

    any ideas?

    Wednesday, March 16, 2011 11:43 AM
  • Thanks to all 

     

    i have solved by myself, 

    we can copy existing lookup field

    and rename its id, there are two ids should be replaced. 

    then it's OK. 

     

    Thanks again


    • Marked as answer by nevernet Wednesday, March 23, 2011 4:21 AM
    Wednesday, March 23, 2011 4:20 AM