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

Any way to post a bit more details on using the #7

Open
JoeriBlootacker opened this issue May 9, 2020 · 1 comment
Open

Any way to post a bit more details on using the #7

JoeriBlootacker opened this issue May 9, 2020 · 1 comment

Comments

@JoeriBlootacker
Copy link

Hello,

First of all, thank you for the hard work on this !

Trying to work out on how to "call" the async proxy.
Can you post a small working sample ?
i can't seem to figure out how to make a async connection.

// Create Async Proxy directly
// (implements both IDiscoveryService and IAsyncDiscoveryService)
var asyncService =
new AsyncDiscoveryServiceProxy(
OrganizationUri,
HomeRealmUri,
Credentials,
null);

Thank you in advance.

@JoeriBlootacker
Copy link
Author

To be more precise....

where do i go wrong, i'm trying to call the async serviceproxy, but i'm not getting connected.
as soon as i use a breakpoint, a second later i'm connected. but not when running the code normally.

    public static async Task<AsyncDiscoveryServiceProxy> ConnectToCRM()
    {

        Globals.Credentials.UserName.UserName = "username";
        Globals.Credentials.UserName.Password = "password";
        Globals.XrmClient =
                new AsyncDiscoveryServiceProxy(
                Globals.OrganizationUri,
                Globals.HomeRealmUri,
                Globals.Credentials,
                null);
        return Globals.XrmClient;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant