locked
Determine activity entity by its activity type code in SDK RRS feed

  • Question

  • I am building a plugin that is supposed to create a specific type of activity based on some setup data stored in custom entities. The setup data tells me what type of activity to create using the attributetypecode option set values. Is there a way to query the metadata in CRM to figure out what activity entity correlates with each activity type code? I know the build in activity types have pre-defined codes, but I dont want to hard code them into my plugin. I have scoured the database looking for a table or something that stores that correlation to no avail. How does the system know what value to put in that column when I create them?
    Tuesday, April 14, 2015 2:33 PM

All replies

  • You can get this information from the ObjectTypeCode of the EntityMetadata class

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, April 14, 2015 2:58 PM
    Moderator
  • Is this something I can query in the SDK? 
    Tuesday, April 14, 2015 3:00 PM
  • Hello JRodman,

    Take a look in the StringMap table in the MSCRM Database. It is queryable too.

    Kind Regards

    Tuesday, April 14, 2015 3:03 PM