Breaking news from around the world
Get the Bing + MSN extension
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I want to retrieve the Organization URL in plugin. Can anyone let me know how we can achieve it?
I am not aware of a way to get it, normally you put the url inside the unsecured configuration of the plugin, or put inside a custom settings entity and retrieve it if you use one.
This may be of some help
Thank you for the answer but I do not want to pass in Configuration of the plugin. Is there any other way to get the Organization URL directly in plugin ?
There is some glitch with CRM community links now and could be a temp issue. Even I can't access the URL, lets wait for sometime and check again.
Try this: https://community.dynamics.com/nav/crm/f/117/t/168259
To achieve this create one field named "OrgUrl".
now set value for the same using Xrm.Page.getAttributes("new_OrgUrl").setValue(Xrm.Page.context.getClientUrl())
retrieve this field's value in plugin, Done.
You can create a Configuration Settings entity, where you store default parameters. Have a record in there for Organization Url, and retrieve that record by name from your plugin.
We used that logic sometime to retrieve parameters that are not available from backend code.
Not what you are looking for, but a solution.
This is an old thread, but this will work in Dynamics 365 for plugins:
var orgName = serviceClient.ConnectedOrgPublishedEndpoints[Microsoft.Xrm.Sdk.Discovery.EndpointType.WebApplication];
This returns the URL part: https://<orgname>.crm.dynamics.com/
Business Applications communities