Bulk update record in CRM Online - excel

I asked a similar yet slightly different question before here. I am using CRM 2013 Online and there are couple of thousand records in it. The records we created by an import of excel sheet data that came from a SQL database.
There were some fields in each record in which there was no data when the first import from excel was made. The system works in such a way that the excel sheet is updated from the SQL database periodically, and that data then needs to be imported in CRM Online. As far as I know and mentioned in the shared link, you can only bulk update the records in CRM by first importing the data from CRM to Excel and then reimporting the same sheet back to excel.
Is there a way to bulk update the records in CRM Online if I get data from the client in an Excel sheet?
Right now I compare their excel sheet to my exported excel sheet and make the required changes. It works well for small amount of records but it is infeasible for bulk record update. Any ideas?
2) Or is their a way to compare two excel sheets and make sure that if you copy columns from one sheet to another, the data in the column ends up in the right rows?

I faced a similar issue with updating records from a CSV file. It is true that SSIS is one way. To solve our problem, I created a .NET executable application which is scheduled to execute once per week. The .NET application does the following
Connects to the organisation
Imports all records from the excel
spreadsheet using a pre-existing data map in CRM organisation
Runs a duplicate detection rule (already existing in the CRM organisation)and brings back all duplicates
Sorts through each duplicate and stores the guid into 2 arrays: list of original records and list of newly imported records (based on created date of record)
Performs a merge of the old data on the record with the new data (this is
performed through the CRM2013 SDK MergeResponse class
Now that the original records have been updated with the new data from the
spreadsheet, delete the duplicate records which have just been
created and then made inactive due to the use of MergeResponse class in step 5 . (for us, we were updating contact info, but wanted the
orginal contact to stay in CRM because they will have cases etc
related to that contact's GUID)
If you want to go down this route, I suggest looking at the example on the MS website which uses the CRM SDK (\CRM 2013 SDK\SDK\SampleCode\CS\DataManagement\DataImport\ImportWithCreate.cs). That is the sample code which I used to create the web service.

As you have thousands of records then I guess that SSIS Package is the best option for you. its very efficient in such scenorios.

This is the approach I would use:
Create a Duplication Detection Rule under Settings > Data Management
Download the Import Template
Adjust your source system to generate the spreadsheet in that particular format
Depending on the frequency of your updates I'd look into CRM web services to import your data.

Related

Update Sharepoint-List with with excel-file using power automate

I'm using PowerApps to modify a list (list A) in Sharepoint. Some of the data displayed in this list is from another list (list B), displayed using lookup. Every week I update list B, with data I get from a automated email. The email contain a excel spreadsheet.
I would like to automate this, but I've run into so many issues I'm not even sure it is possible anymore.
This is my flow:
To my knowledge, it isn't possible to update a list directly from a excel file, unless the excel file is formatted as a table. Instead I have a empty file on my sharepoint that I update, which I later try to use as the source for updating list B.
Sadly this file is either locked by myself, or it won't recognize my table.
Any solutions to solve this problem would be helpful!
Just insert a create table step into the flow.
So you will:
Receive an email with the new Excel file.
Save that temporarily in a secured spot.
Create table on the data required.
Use the table to update the SharePoint list.
I've done that, then I've taken the data listed and added it to a SharePoint list using sample data from a website about single board computers, here:

Copy and paste Excel rows between two workbooks based on criteria from exported Access data

I have no previous experience in Access, VBA coding or in Excel macros prior to teaching myself the past month via these forums. Thank you forums and contributors. I have enjoyed my Access learnings so far, the challenge that it has provided and appreciate any help that I can get. As such, the code and methods that I have used to this point may well be convoluted and confusing. I will do my best to provide relevant details and accurate terminology.
I work in a lab and I am creating an Access Form for semi-automated reporting. Samples are received from clients and are logged into the Excel Table R&D Log. The worksheet is InProcess. Samples are sorted based on the site in which they originate and given a one or two letter site code (G, D, WH, etc.) and an ID "yy-000" in separate Excel columns (i.e. D 18-096). Samples may be submitted for multiple analyses (Metals, Water, Soil, etc.) and may even have multiple rows of reporting if multiple analytes are identified in the sample. There are several other columns, such as receipt date, reporting date, units, etc. Once samples are reported, I manually copy and paste them into the Archived worksheet, and delete the record and blank row from the InProcess worksheet. Since one sample may have multiple analyses and even more potential results, each record would be reported on a new Excel row (with the same D 18-096 ID number). Thus, there is not a single unique identifier or primary key for each sample in the current format. R&D Log is updated manually by lab technicians and the worksheet InProcess is a linked table in an Access Database.
The Access Database is using two combo boxes on a Form frmInProcess to filter a Query qryInProcess of the linked table. The combo boxes are filtering the report destination (one client may receive multiple site codes) and the analysis (reports are separated based on type of analysis). The Query is also filtering out blank results and blank dates, so only completed samples will appear on the filtered Form. I have generated VBA code to this point that will export the Form to a .pdf, save the file with unique filename, and open outlook to mail out the report. I have also managed to export the filtered Form frmInProcess to an Excel file Access Test (not the linked file).
What I would like to do now is to automate the transfer of completed test results from the Excel worksheet R&D Log: InProcess to R&D Log: Archived and delete the record from the InProcess worksheet. I am not sure if I can export the filtered Form into a linked Excel table, or if I must use a separate Excel file (or if it even matters for simplicity of code?). I would now like to read the exported filtered Form in Excel Access Test, lookup matching rows in R&D Log based on several criteria (site, ID, Analysis, Analyte, Report Date) and automate the transfer of records between R&D Log worksheets. End result being that Access generates reports for completed tests, and the records are removed from InProcess testing and transferred to Archived testing in Excel. I am guessing that I may need to close the Access application and perform this in Excel. Hope this is easy enough to follow.
Thank you.
In my experience, importing an Excel document into a temporary NEW (or totally empty) Access table is usually the easiest way to go. Then you do not have to worry about cell references like you do in Excel VBA. Even if the Excel document has old data in it with just a few new changes each time, importing it into a temporary Access table could be the simplest way to go, because then you can compare the data in this table with the data in another, permanent Access table and update the latter based on the former.
As far as the original Excel file, if you need to delete rows there, it might be quicker to export a new Excel file with just the data the old one is supposed to end up with, and then use VBA to delete (or - safer! - rename) the old file.
So the development process goes something like this:
Save import steps by first importing an Excel file via Access' ribbon options "External Data" (tab) ->"Excel" and when you finish, be sure to check the "Save import steps" box and note the name you give the "saved import" because you will need that in your VBA code.
In Access, write a function for deleting the table. The VBA code is:
Const cTable = "MyExcelTempTable"
If TableExists(cTable) Then
DoCmd.DeleteObject acTable, cTable
End If
Now you can test your delete function on the data you imported.
Write VBA code to import the same spreadsheet to create the same table:
Const cSavedImport = "Import-MyExcelTempTable"
' Import the Excel file
DoCmd.RunSavedImportExport cSavedImport
Write more VBA function(s) to check the imported table for bad data and then to copy it into the permanent table. You might be updating existing records or adding new ones. Either way, you could use Access queries or SQL to do this and run them from VBA.
Write a VBA function to rename the old Excel file. (You could use an InputBox if the Excel file name is different each time. I do this for importing Excel files, and I set a default value so I do not have to type as much.)
Write a VBA function to export the new version of the Excel file.
Make yourself a button on a form that, when clicked, runs a VBA function. Inside that function, run Steps 2 through 6, above.
I am not sure my answer exactly matches what you are trying to do, but hopefully you get enough of a picture of the workflow to figure out the details of what you need.

Creating a Sharepoint Report

I work for a fairly large hospital in their Decision Support Department. We have several tools at our disposal for querying data, but our way of distributing the information could use some work.
We typically run our query and then copy and paste the data into Excel. From there we create graphs and crunch some numbers before sending the Excel file out via email.
We've recently been given access to our own Sharepoint site and so far it looks promising for document distribution. What I'm wondering though is this; what kind of functionality is built into Sharepoint for building reports that run automatically.
It would be great to take a whack of our monthly query to Excel reports and set them up to run automatically via Sharepoint.
I did some reading about Sharepoint lists and that seems promising, but I thought I'd ask here for the best way to go about this - provided it's even possible.
I guess a good first step would be how to create a report in Sharepoint?
I'm going to assume you're using Sharepoint 2013 and Office 2013.
You have a couple options available to you with Excel and Access. Both methods I'll briefly describe can be automated. In either case, you will need Lists, as they can connect to Excel and Access as tables.
For the Excel route, simply choose the "Export to Excel" option in a SharePoint list. This will create an Excel version of your list, but it's more than a static workbook--that workbook retains a one-way link from SharePoint to Excel, so you can refresh the spreadsheet to reflect the most up-to-date version of your SharePoint list. Furthermore, you can link multiple Lists to a single workbook--you'll have to export each list to Excel individually, but each worksheet will still retain its link to its respective list after you consolidate the spreadsheets into a single workbook. You can save this workbook wherever you like, it'll still keep the link. I personally like to set my linked workbooks up with macros that automatically refresh the spreadsheet whenever file is opened, but that's just me. The reason you might consider this option would be to avoid having to recreate the work of creating graphs and whatever other analytics you're doing--you may well be able to set yourself up such that the graphs and analytics pull live from the table that's coming in from SharePoint.
*Do note that changes you make to list data in Excel isn't sent back to SharePoint--this is done to protect your list.
For the the Access route, you can import a list into Access as a table. This option creates a dynamic link to your SharePoint list the same way the Excel option does--the link is one-way and what you do in Access won't be sent back to SharePoint. You can create queries and reports as you normally would after the table is imported.

Can Access replace data information in an upload?

I have a project in Access where we are using tables that have the customers information. These tables were created by downloading as Excel from another site of ours and then uploading to the Access program.
The problem is that the information on our other site changes sometimes, and we really don't know what has changed on our existing information. When we append a new Excel download it will add customeraccountID's that are not on the table yet, but I need a way of finding out if there are any changes to the existing information.
I have tried an update query, but that makes forms that have a relationship to the customer information tables not show the detail section. From what I have researched, this is possibly due to the update query making the updated table read only.
I have taken an made a query that gives me a list of all the duplicates between the newly downloaded Excel and the existing table, but now I need some way to find if there is any changes. There are 60 columns where there could be changes.
We are not against manually updated our tables if we can find a way of finding out what has changed.
I have considered downloading the duplicates report to excel and running a formula using exact(a2:a61,b2:b61), but then I would have to copy that formula to every other row through thousands of rows. I have no preference to whether we find the changes by Excel or Access.
The best way would be to have Access replace the information when appending the new information, not just drop the duplicates. Which would mean having Access replace the existing data when appending. Is that possible or can a report be created that shows where the information differs?

How to link ms excel 2003 to ms access 2003

I have office 2003, and i have develop a database from ms access 2003.
What i want is to link ms excel and ms access so as when am updating either of them both will be updated
I know that from within Access, you can add a "linked table" with an Excel worksheet as a data source. This will cause the data in the Excel sheet to show up as a table in Access. When you make changes to the data in Access, the data in the underlying Excel sheet will change. Also, if you open up the Excel sheet and change the values in one of the rows, the change will be reflected when the link in Access is refreshed.
However, there can be issues when trying to link Access and Excel together. You may not be able to edit the same document from Access and Excel at the same time. Also, if you add additional columns or rows to your source data in Excel, you may have to completely re-link the table in Access.
If you are the only user of both the Access application and Excel sheet, you can develop a fairly robust solution using this method. However, you have to be careful with trying to deploy a solution like this with multiple users because you may start to get issues with multiple people trying to edit the same document at one time. At this point, you may need to look at more robust solutions involving a database or SharePoint backend.
As Ben said in his answer it is possible but can easily lead to problems in a multi user environment. I would suggest keeping the data in access and pulling it from excel. Or revisiting if excel is needed at all to update the date (read only reports would be ok)

Resources