11. september 2008 09:47
Is there a way of finding out what the Object Type Code (OTC) is for a custom entity. I know that for a system entity you can go to http://crmserver:5555/sdk/list.aspx (where crmserver is the URL of your CRM server) and find out what the OTC is for a system entity but how can you find out what it is for a custom one.
The reason I am asking is that I am wanting to use CRM Extensions free counter plugin on a project I am working on and one of the requirements is that I need the OTC so that I can add counters to some of the custom entities I have created.
Any advice would be most gratefully received.
11. september 2008 09:52You can use the metadataservice for retrieving the entity metadata, which contains object type code for the entity as well.
11. september 2008 10:30
Many thanks for your swift reply. Unfortunately I'm not a developer and so from what I could find out about the MetadataService I would have to create some sort of programme in order to retrieve the values I needed. I may be wrong.
Anyway, found a couple of easier ways to do this:
This pops up an alert box with the Object Type Code. A bit of a fiddle if you have to do this for a lot of custom entities but it does work.
2. Open up a record of the type whose Object Type Code you wish to find out. Once the form has loaded press Ctrl-N on your keyboard. This brings up a copy of the current form but this time it has the address bar exposed at the top of the screen. If you then look at the URL of the page you will find that the Object Type Code is given at the end where it says, "&etc=xxxxx#", where xxxxx is the Object Type Code.
11. september 2008 11:25
You can also obtain a custom entity's OTC using the same URL you use for system entities. Remember that your entity name will start with the customisation's prefix i.e. "new_" if you haven't changed it.