Saturday, July 17, 2010

Open custom entity windows using ETN instead of ETC

I am connecting an Adobe Flex application to MS CRM and one of the tasks we need to do is open a CRM window of a custom entity. If you look at the URL of the custom entity, it contains a parameter that says "etc=1000x" where the number is a reference to the custom entity edit form. If you are developing on the production system (not a good idea) that number is safe to use. However, if you develop on a different system, there is a good chance that the "etc" number will be different.

I recommend that you use the "etn=new_customentity" parameter instead of the "etc=" because the name of the custom entity will always be the same between the development and production systems. The value for etn will be the custom entity name which you will find on the entity customization form.

Helpful tip: if you want to see the full URL of a crm form, press F11 to make the browser full size, then move your mouse to the top of the window and the URL bar will appear - then you can copy the URL and paste it into an editor for your inspection.

Please let me know if this helps and leave a comment.
Thanks!

2 comments:

Yeray said...

Hi..I have a problem with this... Dont work.I tried a Javascript code as this:

crmForm.all.IFRAME_a.src="http://SERVER/NAME_ORG/userdefined/edit.aspx?etn=NAME_CUSTOM_ENITY&id={GUID_SPECIFIC_CUSTOM_ENTITY}";

But the iframe doesnt work. The iframe say me that i havent permission od security for get this entity. Any idea?

eccountable said...

You have to replace your custom entity name in the URL. For example, if you create an entity called "Rate" then your URL might look something like this: http://localhost:5555/crm/userdefined/edit.aspx?id={5DBBE7B8-322D-471B-8929-813475579720}&etn=new_rate#