Wednesday, September 15, 2010

Another way of loading certain CRM Views into an IFRAME on the main form

Since every CRM View has its own GUID and can be launched using the Advanced Find out-of-the-box functionality, you can follow several easy steps to load what view you want (with whatever additional filters you want) in a certain IFRAME available on the crmForm.
Here's the scenario: you wanna display your active contacts (My Active Contacts view) in a separate TAB on your account entity form.
- find out the id and objecttypecode of your view;
- create a new TAB and IFRAME on the form of the account entity;
- dynamically set the IFRAME URL as following:
http://[crm_server_name]/[ORGANIZATION_NAME]/AdvancedFind/AdvFind.aspx?EntityCode=[CRM_VIEW_ENTITY_CODE]&QueryId=[CRM_VIEW_ID]&ViewType=1039&AutoRun=True (for our scenario, it would be something like http://CRMSERVER/MyOrganization/AdvancedFind/AdvFind.aspx?EntityCode=2&QueryId={FC3A5B78-1AA4-10C4-1234-12C45B78F01A}&AutoRun=True )
Warning: you must type "AutoRun=True" using this casing. lower/upper case won't trigger the Advanced Find to auto run (and that because the parsing of that parameter is as it is).

There you go - your custom filtered view available anywhere you want on any form :)

2 comentarii:

Octavian Cucută said...

Good to see you're still up for research. :-)
Thanks!

CSC said...

Just couldn't let you get all the fun :)