Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RetrieveCurrentOrganisationRequest is missing #136

Open
jordimontana82 opened this issue Mar 1, 2024 · 4 comments
Open

RetrieveCurrentOrganisationRequest is missing #136

jordimontana82 opened this issue Mar 1, 2024 · 4 comments
Labels
enhancement New feature or request scope-messages

Comments

@jordimontana82
Copy link
Contributor

Add implementation for the above organisation request, that allows to retrieve information about the organisation you're currently connected to.

https://learn.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.retrievecurrentorganizationrequest?view=dataverse-sdk-latest

@jordimontana82 jordimontana82 added enhancement New feature or request scope-messages labels Mar 1, 2024
jordimontana82 added a commit to DynamicsValue/fake-xrm-easy-messages that referenced this issue Mar 2, 2024
jordimontana82 added a commit to DynamicsValue/fake-xrm-easy-messages that referenced this issue Mar 2, 2024
…s are v9 specific plus the request is available only for >= 2015 versions. DynamicsValue/fake-xrm-easy#136
@jordimontana82
Copy link
Contributor Author

@ozdemir-mehmet
Copy link

@jordimontana82 was it a deliberate decision to only include OrganizationDataService in this implementation? As OrganisationService and WebApplication are also valid Enums

DynamicsValue/fake-xrm-easy-messages@05db9a3

 if (orgDetail == null)
            {
                orgDetail = new OrganizationDetail()
                {
                    Endpoints = 
                    {
                        { EndpointType.OrganizationDataService, "http://baseUrl/XrmServices/2011/OrganizationDataService.svc" }
                    }
                };
            }
[DataContract(Name = "EndpointType", Namespace = "http://schemas.microsoft.com/xrm/2014/Contracts")]
public enum EndpointType
{
    [EnumMember]
    OrganizationService,
    [EnumMember]
    OrganizationDataService,
    [EnumMember]
    WebApplication
}

@jordimontana82
Copy link
Contributor Author

Hi @ozdemir-mehmet ,

Good point, yes, this message was introduced mostly as it was needed for another piece of work. Do you need to use the other endpoints?

@jordimontana82 jordimontana82 reopened this Jul 8, 2024
@ozdemir-mehmet
Copy link

ozdemir-mehmet commented Jul 8, 2024

Yep using WebApplication, I think if all three are added just following the same pattern it should be enough. Even better being able initialise them as part of the test setup?

I've done something like this in the meantime as my unit tests were failing :)

`

        try
        {
            var uriString = response.Detail.Endpoints[EndpointType.WebApplication];
            return new Uri(uriString);
        }
        catch { return null; }

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope-messages
Projects
None yet
Development

No branches or pull requests

2 participants