Upload document to Microsoft Dynamics CRM integrated with Sharepoint - c#

I need to be able to upload a document created totally outside Sharepoint and CRM into the CRM document management system on the associated Sharepoint site. By the way it is Microsoft Dynamics CRM online. I have searched high and low, asked Sharepoint experts, called Microsoft Support but cannot find a solution. The document is created dynamically, probably in some sort of batch process, so this needs to be handled programmatically. The application is written in C# and I want, after creating the document, to find the relevant Sharepoint folder within the CRM system, which will be under one of the account entities, and upload it there. The one solution I did come across is this:
Add document sharepoint using web service Microsoft Dynamics CRM
Which seems promising but I can't get it to work. Has anyone ever done anything like this before?

Related

Cannot locate Microsoft.Office.Interop.Outlook Reference

I have been tasked to convert an Outlook Distribution list to a CSV file.
I have seen some examples online but I can’t find the COM reference.
Question:
Do I need to have Office installed to find the reference?
Does a subscription to Office 365 work as well?
I’m developing this project with VS 2022, and .NET 6
Thank you!
First of all, there are several ways to get get distribution list members. If you deal with Exchange profiles only you may consider using EWS, see Expanding a distribution list by using the EWS Managed API 2.0 for more information.
Another possible option is Graph API. Distribution lists are actually represented by the group entity in Microsoft Graph, so in your case you should be able to use the id returned from your people search in the following to get the group/DLs members
GET https://graph.microsoft.com/v1.0/groups/{id}/members
You could just search for your DL by filtering on the group entity:
GET https://graph.microsoft.com/v1.0/groups?$filter=displayName eq 'DL_NAME'
The people API is really about people that you communicate with most often - and it includes users, groups and contacts.
Both EWS and Graph API don't require installing anything on the end-user machine and can be used from the server-side or service software.
The last option is automating Outlook. In that case you need to install the desktop editions of Outlook to get a COM server registered for the application. As soon as COM server is registered you can add an Outlook COM reference.
Does a subscription to Office 365 work as well?
Yes, if it allows installing Outlook on your machine.

How to go about it: sync/export data for Accounts from Microsoft Dynamics 365 CRM and show it in a 3rd party web app? Using WS and ASP.NET MVC/C#

I'm trying to get data from Microsoft Dynamics 365 CRM, specifically the Accounts and their data to show it in my own web app that I will build using ASP.NET MVC and C#.
How would I go about doing this so that my web app will instantly be updated when the data in CRM changes? I find it difficult enough navigating through the Dynamics platform already, thanks Microsoft.
The app would work like this:
When run, the app would get the initial data, and establish a real-time connection with WS to the CRM to get further new data/changes.
the app will display this data in a table.
When a change is detected, the web app should update without refreshing the page.
individual table rows will be colored according to number of contacts and if they lack any contact data.
I've started researching webhooks with MS CRM, but it seems Visual Basic is crapping out on me a lot and I cant get the tools to work properly . I think that I have to establish a connection somehow with WebSocket to the CRM, I just don't know which technologies to use and what plugins there are, seeing I'm new to ASP.NET MVC and C#.
Anyway, I just don't know where to start. Could someone send me in the right direction? I would greatly appreciate it!
You can access the data inside a Dynamics 365 / Power Apps instance (also known as Dynamics CRM or Dynamics 365 CE) using the APIs provided by the system.
You can leverage these APIs using the SDK provided by Microsoft (this one https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/ or this one in preview for .NET Core https://www.nuget.org/packages/Microsoft.PowerPlatform.Dataverse.Client/) or by calling the API directly inside the language of your choice.
Usually you need to deal with CRUD events, and the APIs can do that. In your question you mention "the web app should update without refreshing the page" so you will need to take a look at webhooks (here a doc page https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/use-webhooks) handle them in your application and see if they fit your requirements.

Programmatically crawl Sharepoint 2013

I'm new to the SharePoint 2013 .Net Client API. I want to programmatically crawl all of a SharePoint site. I want to fully extract lists, document, pages, everything!
Ideally I want to start with the root of the website and crawl everything from there.
Can someone give a high-level overview of the basic steps involved? For example, do I need to create a catalog, or can I simply crawl if I have the admin credentials?
I'm using C#, .Net 4.0, and the Client runtime API (not REST).
Some of the links that were helpful for me :
1. Crawling with Rest API or PowerShell - Start a crawl manually via SOAP or REST WebService
2. Recrawling using code - http://sebastian.expert/force-web-whole-list-library-re-crawled-search-sharepoint-2013-using-api/
I believe that everything in SharePoint lives under a List. Essentially, I fetch the Lists belonging to a Web and fetch all the ListItems from those. I ignore Folder and File collections as these are duplicates.

Querying through a list of documents and its contents with Sharepoint 2010 Services

I am currently developing an application using Sharepoint 2010 Web services to access data from a Sharepoint server. Im using ListData.svc to get items of a particular list of documents saved in the SP server, and my aim is to be able to search through this list, including its documents contents. I have been researching through options, and have seen stuff like asmx, enterprise search API, query services, etc., but I am not quite sure if this would really crawl through the file contents.
Can you enlighten me on what web service to use to be able to search through a particular list of files-- all its properties and file contents? Similar to the search option in an actual Sharepoint site?
Thanks!
Id expect a quick google on "Sharepoint 2010 search api" to yield up https://msdn.microsoft.com/en-us/library/office/websvcspsearch(v=office.14).aspx which says "Search in Microsoft SharePoint Foundation 2010 exposes its search functionalities through the Query Web service. This allows you to access SharePoint Foundation Search results from client applications and Web applications outside of the context of a SharePoint site."
I guess if you read those docs, the solution will be in there.

Adding SharePoint screen to legacy c# application

We have an Enterprise application written in C# that we well to customers. The server runs in our data center and the customers connect via a windows application also written in C#. Pretty standard.
Management would like a dashboard added to our application. I was told to look into using sharepoint to somehow add a sharepoint dashboard to the main screen of our client application (winforms).
Is this possible? The client application would have to somehow show a web page from the sharepoint server which I guess is no problem using a html componenent. But I'm more worried about getting sharepoint to work with our existing data (sql server 2008).
I suggested just writing the dashboard ourselves and avoiding sharepoint. But management would like to add more 'Business Intelligence' to our application. I know that is the way of the future but I'm worried about the complexity of integration with sharepoint.
There are various options for integrating SharePoint into a windows forms application. The simplest is embedding a web browser control and point it to the page with the dashboard set up.
Alternatively you could use the SharePoint client object model (2)(make calls to the SharePoint server) and retrieve data (and potentially pages) from SharePoint to put into your dashboard.
I would recommend to management that we can display SharePoint through our current application, and we can demonstrate with a simple dashboard part (eg chart control) to demonstrate how we can make the dashboard integrate more naturally over time piece by piece. This would minimise risk by displaying from SharePoint, while being able to show the potential advantages of using the SharePoint data and creating a customised windows forms dashboard.
SharePoint does a good job of going either way with information via BCS, assuming you would want to show LOB data in a SharePoint deployment.
However, since you want to go the other way, the Client Object Model works well with this. Seeing as how it is a .NET application, I can site specific times where we have used the built in REST services to get information from lists in our enterprise SharePoint deployments.
Security will need to be addressed as well, so don't forget about that. If you have AD groups already set up for your enterprise application, you can most likely reuse some of those in SharePoint. If you don't, you will have to now manage how data will be secured. You may also end up getting prompted for a log in to SP which is never a good user experience.
Good luck!

Categories