Determining URL for Activity popup. RRS feed

  • Question

  • I want to programatically display the Entity popup for an Activity.  So, if I have a phone call with id = BF812CBD-574B-DE11-B709-001E0B614992 and I know it's a phone call (typecode 4210), I need to create this URL:


    The problem is the /phone part.  The EntityCode 4210 has text value PhoneCall.  Is there any way to get the value to use for the URL activity type portion from the metadata service (or somewhere else) based on the Entity Type Code?  I'd like to avoid hardcoding if possible.

    Thursday, May 28, 2009 8:41 AM


All replies

  • You shouldn't avoid hardcoding here, since activity typecodes never change. Just set your string to be "phone" whenever the code equals 4210.

    • Proposed as answer by Daniel Middel Thursday, May 28, 2009 10:57 AM
    Thursday, May 28, 2009 8:56 AM
  • Thanks Daniel.  Is there a finite list of Activity Types? I don't want to hardcode, so I can handle activity types I don't currently know about.  The list I know about now is: 


    But, if there are others, or a user can create their own, I'd rather be able to pull that information from somewhere based on the activitytypecode (entity type code value) than hardcode only the ones I know about. 

    Thursday, May 28, 2009 9:10 AM
  • Thats all of them. You can't create any custom activities, so you need to worry about new activity types.
    For a complete list of typecodes, check http://msdn.microsoft.com/en-us/library/aa682922.aspx
    • Marked as answer by dmTech04 Thursday, May 28, 2009 4:37 PM
    Thursday, May 28, 2009 10:56 AM
  • Thanks Daniel. 
    Thursday, May 28, 2009 4:38 PM
  • This is the CRM 4.0 Entity Type Code list for anyone else reading this thread:

    The above is for CRM 3.0.
    Thursday, May 28, 2009 5:13 PM