How to Pull Microsoft CRM data and Display on sharepoint page - c#

I want to know how i will pull Microsoft CRM 4.0 data and display it into Sharepoints Page.
Cann any one suggest some Architecture for this.
And anyon tell me what is the pros and cons when we doing this.
Any suggestions are most welcome.
Regards
Sachin

Use the List Web Part for Microsoft Dynamics CRM 4.0
Alternatively, you could build your own web part and populate it with data retrieved via the CRM web services or the FilteredViews in the Database.

You can either:
Use the CRM Web Part.
Select straight from the CRM defined views within SQL Server.
Use the CRM Fetch XML Web Services API.
Use the Advanced Developer Extensions in the 4.1.2 SDK that provide LINQ and OData support over the top of your CRM.

Related

Which C# OData Client library to use for Dynamics CRM 365 Web Api?

I'm calling Dynamics 365 through it's OData Web Api and I'm wondering which client library I could use to make programming easier.
My use case is that I mainly have to work with one entity: contact. I would like to retrieve some data, edit data and create new contacts. The other entity type I'm working with in a similar way is address. A contact can have multiple addresses.
Currenlty I'm using plain HTTP Client class for the communication to Dynamics.
I am developing a .NET Core application for Linux hosts, because of this I can't use the Dynamics CRM SDK (SOAP Endpoint).
My question would be what your advice is: should I use Microsoft.OData.Client or Simple.OData.Client? Or any other library?
I tried to use Microsoft.OData.Client and generated a client (proxy/wrapper) according to this article: https://blogs.msdn.microsoft.com/odatateam/2014/03/11/tutorial-sample-how-to-use-odata-client-code-generator-to-generate-client-side-proxy-class/
The problem with this is that it generates a .cs filewith 86 MB file size. Maybe it could be a solution to use this client afterwards, but it just seems so wrong to have such a big source file in our project. I would like to avoid it, but I didn't find an option to generate this If I accidentally open it, Visual Studio crashes, intellisense get's slow some times, if ReSharper is turned on VS is slowed down enourmously, etc...
I checked Simple.OData.Client and seems to have nice documentation and API. For instance: https://github.com/object/Simple.OData.Client/wiki/Retrieving-data
For Microsoft.OData.Client I didn't find documentation how to use it in a typed manner without generating the whole client. Is that possible? I only found this, where the generated context is used: http://odata.github.io/odata.net/v6/#04-01-basic-crud-operations
I think going with Simple.OData.Client seems to be a better option, but I would prefer to use a Microsoft library.
Do you have any reccomendations?
I have just implemented integration from .Net Core Web App running in Azure App services to Dynamics 365 Web API as a POC.
This included reading reference data ( joining different entities ) and modifying entities with referential data columns.
Full OData interface generation is problematic I found:
Could not find tooling that supports OAuth2 authorization and VS2019
Full interface definition inclusive of navigational properties / functions / actions and all entities with all fields becomes unwieldy to navigate and VS navigation is sluggish.
Depending on OData client you are going to use it will be sending much more information over the wire than needed and add complexity that is not in the spirit of the underlying REST OData service.
Generated code tools violated C# coding rules ( using reserved keywords like event, abstract and also generating members with same name as enclosing type ) requiring manual correction.
After much research I started using Simple.OData.Client as this allowed me
VS2019 / .Net core compatible toolset / runtime
Connect to Dynamics 365 OData Web API with OAuth2 bearer token
Write typed code in VS
Create only the entity models / navigational properties etc that I needed
Can select only the entity attributes you need to return instead of 200 ( smaller payloads )
You have to create the entity classes used in the typed fluent API yourself
Use DataContract attributes in case you want the CRM entity names to be different between CRM / C# code.
Simple.OData will then use the DataContract attributes when making up the Http call.
Unfortunately I didn't find the documentation all that insightful when I started looking deeper on issues like OAuth2 authorization and navigational properties but did find all my answers in secondary sources like github issues and some advanced tutorials for example
https://www.odata.org/blog/advanced-odata-tutorial-with-simple-odata-client/
Also using Fiddler to see the communications going back and forth is unbelievably useful in understanding what is going on.
Microsoft has introduced a Web API, a RESTful web service you can use to interact with data in Dynamics 365 using a wide variety of platforms, programming languages, and devices.
https://learn.microsoft.com/en-us/dynamics365/customer-engagement/developer/webapi/perform-operations-web-api
This is a new way of communicating with Dynamics 365 programmatically.
There are several libraries available that you can use. From below article, you can find those.
https://community.dynamics.com/crm/b/briteglobalsolutions/archive/2017/10/22/webapi-library-comparison-in-dynamics-365
I have personally used David Yack's library.
https://github.com/davidyack
Hope this helps.

Share access programmatically Dynamics CRM web api

Is there an action to programmatically share (GrantAccess) a phonecall activity to other user (systemuser) through Dynamics CRM web api (v8.1)? As far as seen only samples is through organization services.
GrantAccess message will be available in v9.0 web api.
MSDN declared this as limitation as of v8.2 webapi.
Missing functions and actions for some organization service messages
The following table lists the messages that don't have a corresponding
function or action after December 2016 update for Microsoft Dynamics
365 (online) and December 2016 Service Pack for Microsoft Dynamics 365
(on-premises) are applied.
GrantAccessRequest
AFAIK actions available in v8.1 through WebApi. So obvious alternative solution - create action that will accept parameters phonecall reference and user and share record. And you can call that action using WebApi and JS.
Good luck.

Using MVC 5 web page to get data from outlook server?

I've had a look around and can't seem to find what I'm looking for (unless I have and didn't realise...)
I have been tasked with creating a basic CRM web based app so that it can be used on any device.
I am using MVC 5 to do this using SQL server to store all the required tables.
What I need to do know is be able to sync with an outlook exchange server so that the user can log in and their list of contacts/scheduled tasks are taken from the outlook information as well as be able to create/edit/delete etc the contacts + scheduled tasks and be able to post them back to the outlook server. ie without having to open a local Microsoft Outlook application.
Is this possible and if so does anyone know where I may be able to find a good enough source to help me learn this further.
thanks...
Tewr's comment is right on the spot as this is a scenario suited for EWS (Exchange Web Services).
If you're using MVC 5 to develop this application, it may be the most helpful to use EWS Managed API to access the Exchange server as it allows you to all of it in C#.
Managed API - http://msdn.microsoft.com/en-us/library/office/jj220499(v=exchg.80).aspx
Working with contacts - http://msdn.microsoft.com/en-us/library/office/ee693004(v=exchg.80).aspx

Need to connect to Salesforce CRM using .Net C#

I am new to the Salesforce CRM world and i need to write a generic connector/plugin in C# to connect to Salesforce CRM DB for one of our product.
Idea is that for which ever customer we want to provide our services to, we would obtain all their CRM data by using our plugin and store it locally into our DB. Although, our local DB would also be stored on Cloud, however initially even if we can figure out first how to do it with on premise SQL DB, we can migrate it later on.
Also, we would want some sync capability onto this connector which can continuously sync data from CRM on a periodic basis. Any help/pointers will be greatly appreciated.
You have a few options:
Use the Salesforce API and build a wrapper yourself. You need to setup developer account etc.
http://www.salesforce.com/us/developer/docs/api/index.htm
http://www.maatech.com/dotnetframework/using-salesforce-com-in-c.html
Use a 3rd part DLL to connect to Salesforce and make it easy to work with Salesforce objects. Most of the DLLs are paid versions with trial facility.
http://visualstudiogallery.msdn.microsoft.com/a639fe58-54b6-429b-b875-1584c365afb7
http://visualstudiogallery.msdn.microsoft.com/f6ecab53-dec5-4aca-b559-ce39315f6781
There are a set of prerequisites that you need to get done in order to interact with salesforce API using the C# .NET.
Username and Password (salesforce logins)
SOAP API (WSDL file)
Security Token

Sharepoint or Webapp for simple intranet applications?

Need an advice on design approach. I spent couple of hours googling and still cannot come to a conclusion. Task at hand:
design intranet app that will have access control. Users should be given rights to access it.
C# is a preferred design language
app can be a simple form with some text fields and some fields as dropdown boxes from a DB
app will send SOAP request upon form completion
there should be a couple more forms like db search, preferably with sorting ability for columns
There is a Sharepoint I can get access to. Can it easily solve the access rights management or or should create a separate app on the same IIS or perhaps I shold request a separate IIS created and deal with access rights via DOTNET solutions? What is the quickest way to design this in your view?
Our SharePoint is 2010, and professional edition of VS2013 available for development.
Thank you
About SharePoint:
There is a permission management in SharePoint. You can set user permissions up to individual items, files and pages. You can read about it here: User permissions and permission levels in SharePoint 2013 and here: Fine-grained permission reference for SharePoint Server 2013. You can use differend authentication providers (AD, FBA, Oauth etc): Authentication, authorization, and security in SharePoint 2013.
You can create customization declaratively (no code), ะก# or javascript. There is built in object model (client and server) and web services (REST for 2013 or SOAP for 2010). More about SharePoint for developers
You can use built in form web parts or create custom with server code (C#) or with just HTML and javascript. All you can do with asp.net - you can do in SharePoint with custom web parts. But you can do most of things just with HTML and javascript.
You can request web services from server code (C#) or from javascript - just like in asp.net apps.
You can do db search with javascript or server code, using your prefer datagrid controls.
I think most easy way is using SharePoint 2013 Foundation (it's free if you have Windows Server license). And using javascript and HTML - in this way you don't need to know anything about deploying solutions in SharePoint etc. But you can do it via custom web parts - in this way you may do it like common asp.net development. But it's not a best way.

Categories

Resources