web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Find CRM Client URL in the Plugin or Workflow

(0) ShareShare
ReportReport
Posted on by

I need to find the Server URL of the client using the current context, and I need to do it directly from the Plugin, not by passing it as an input using JavaScript like (getClientUrl();).

Note that I am getting the Organization Name in a manner like: 

string OrganizationName = context.OrganizationName;

But couldn't find a way to get the CRM URL using the current context, any help is appreciated!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    Within the plugin you cannot obtain from service, or context.

    You will have to pass through plugin configuration (unsecure) and get it through the plugin constructor.

    Otherwise you will have to get it from custom configuration entity, if you have so.

  • David Jennaway Profile Picture
    14,065 on at

    You can't get this directly. One reason is that there's not necessarily just one url - for instance if you have IFD then the internal and external urls are different, but that information won't be passed into the plugin.

    What do you need this for ? One fairly simple option is to pass the url in the configuration string in the plugin step, though you'd have to update the step if you import the solution into a different deployment

  • ashlega Profile Picture
    34,477 on at

    You could also create a configuration entity and store the url there (can use javascript to populate the field). Or, if it's an "update/create" plugin, you might also have a hidden field on the entity form, and you might put org url in that field using javascript (then you could access that field in the plugin).

    But then again, that IFD thing.. Sounds like you need to see those links outside of CRM?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans