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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Single Page App with CRM

(0) ShareShare
ReportReport
Posted on by 75

Hi everyone!

I'm building a single page application integrates with Dynamics CRM 2015 On-premise for a sales team to take sales orders remotely using tablets.

I have a doubt with handling the OrganizationService connection through CRM SDK. The context is the following:

I have a front-end, built with Angular and WinJS, and the back-end is a bunch of CRUD operations in a Web API using C#. These operations execute different actions in the CRM Organization. Besides, each sales person has a unique CRM System User. I built the back-end to use OAuth authentication with bearer token. But now, I have doubts for handling the OrganizationService instance for each user. When a sales person log in into the app, I have to check if the user is valid and get an OrganizationService object to execute all the operations the user is going to do.

My question is, How can I handle the OrganizationService instances for each user?

I thought to do this through a connection pooling. Any other ideas?

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • ScottDurow Profile Picture
    21 on at

    You could use the built in WebAPI - this handles all of that for you? msdn.microsoft.com/.../mt593051.aspx

  • Hugo G. Morillo Profile Picture
    75 on at

    Well, I need to do some complex queries to retrieve different entities. I want to do that using LINQ. Besides, the new Web API was available from Dynamics CRM 2015 Update 1 (Online only). My client has Dynamics CRM 2015 On-premise (7.0.1)

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Ok - I understand.

    IF you use the Xrm.Client that handles connection pooling for you - see my post about this -  develop1.net/.../MicrosoftXrmClient-Part-2.aspx

    Hope this helps

  • ScottDurow Profile Picture
    21 on at

    How did you get on Hugo? Do you need any more help?

  • Hugo G. Morillo Profile Picture
    75 on at

    Hey Scott.

    Thanks for asking. I decided for creating a manager of CRM connections, so I can create/get dynamically CRM Context linked to the token the user adquired in the authentication and authorization phase. Your previous post gave me the idea using Xrm.Client, so thanks for the approach

  • Community Member Profile Picture
    on at

    hello Hugo,

    Could you please elaborate with a psuedo code if possible?

    Thank you very much.

    harihar

  • Community Member Profile Picture
    on at

     link is not working

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans