none
Email Activity Customization

    Question

  • Hi All,

    I have a below query

     

    When you want to send an email and choose a person to send it to, or copy, or blind copy, it always defaults to “Account”.  I would like to have CRM default to “Contact” but still have the other selections available such as Lead.

     

    I have worked on  a similar kind of scenario as below

     

    Query:

    ===========

     

    For dual use fields that can be account or contact, any easy way to set the default to be contact instead of account such as in cases, etc?( Customer) 

     

    Resolution:

    ==============

     

    Use the below code in the “Onload” of the case entity

     

    crmForm.all.customerid.setAttribute("lookuptypes", "2");

     

     

    Can any one  help me for the email activity?

    Regards,

    VP

    Tuesday, July 27, 2010 7:24 PM

Answers

  • My bad, I used the "customerid" field to match the field you specified in your first post with the code.  Try:

    crmForm.all.to.setAttribute("defaulttype", "2");
    


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Wednesday, July 28, 2010 4:12 PM
    Moderator

All replies

  • The field uses a 1:1:1 pairing of special string arrays for three attributes:  lookuptypes , lookuptypenames , and lookupiconslookuptypes and lookuptypenames are comma-separated, whereas lookupicons is colon-separated.

    lookuptypes contains the Object Type Codes  (e.g.  "2,1")

    lookuptypenames contains the Entity Names  (e.g.  "contact,account")

    lookupicons contains the URLs for the record icon (e.g.  "/_imgs/ico_16_2.gif:/_imgs/ico_16_1.gif")

    I don't know if re-ordering these three will cause the lookup window's entity selection list to be reordered, but I suppose it's worth a shot.  Definitely post the results back here.  I suspect, however, you must re-order all three attributes.  I would not exclude any entity types from the lists, since I don't think there's another way to tell the Lookup dialog which options to provide.


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Tuesday, July 27, 2010 10:12 PM
    Moderator
  • What was I thinking?  The answer was staring at me in the face the whole time.  Try using the defaulttype attribute instead.  This attribute takes the OTC (so, a value from lookuptypes ).

    crmForm.all.customerid.setAttribute("defaulttype", "2");


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Tuesday, July 27, 2010 10:19 PM
    Moderator
  • HI David,

    Thanks for the reply. When i paste the code in Onload of email entity, i get CRMform.all.customeris is NULL. 

    please let me know

    Regards,

    VP

    Wednesday, July 28, 2010 1:02 AM
  • My bad, I used the "customerid" field to match the field you specified in your first post with the code.  Try:

    crmForm.all.to.setAttribute("defaulttype", "2");
    


    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Wednesday, July 28, 2010 4:12 PM
    Moderator
  • Hi David,

     

    It works well. thank alot for the help

    Cheers

    VP

    Thursday, July 29, 2010 8:43 PM
  • I think I'll drop this little tip into my blog.  Glad it worked.  Kindly mark the answer for the thread, if you would.
    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Thursday, July 29, 2010 9:04 PM
    Moderator