locked
CRM 4.0 organisation URL in plugin RRS feed

  • Question

  • Hi,

    I'm using CRM 4.0 and putting a link inside an email from CRM. To do this i'm following this :

    http://blogs.inetium.com/blogs/microsoftcrm/archive/2008/09/21/embedding-a-direct-link-in-an-e-mail-crm-4-0-version2.aspx

    I've created a new attribute to store the url which I'm trying to link to and have the plugin to populate the attribute on create of a new record. What I want to do now is automatically get the main crm URL path been used within the plugin. At the moment the example uses a hard coded URL. Is there any way to get the path been used automatically or will I need to create another attibute to store the url (e.g. in a global data entity)?

    For example, if I use http://crm.mydomain.com/ to access the CRM system. Is there any way to get that URL from within a plugin?
    Tuesday, April 14, 2009 1:41 PM

Answers

  • This is not directly available in the plugin, but could be got through the CrmDiscoveryService. Use a RetrieveOrganizations message, and iterate through the OrganizationDetail instances till you find the one an OrganizationId that matches context.OrganizationId. The WebApplicationUrl property of the OrganizationDetail instance should give you what you want


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
    Monday, April 20, 2009 12:15 PM
    Moderator

All replies

  • This is not directly available in the plugin, but could be got through the CrmDiscoveryService. Use a RetrieveOrganizations message, and iterate through the OrganizationDetail instances till you find the one an OrganizationId that matches context.OrganizationId. The WebApplicationUrl property of the OrganizationDetail instance should give you what you want


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
    Monday, April 20, 2009 12:15 PM
    Moderator
  • You can use context.OrganizationName to make url.
    G. Goyal
    • Proposed as answer by G Goyal Thursday, May 28, 2009 9:49 AM
    Saturday, April 25, 2009 5:33 AM
  • You can pass URL in unsecured Parameter.


    G. Goyal
    • Proposed as answer by G Goyal Thursday, May 28, 2009 9:49 AM
    Thursday, May 28, 2009 9:48 AM