How to migrate files from MS SQL Server to Dynamics CRM Notes via Scribe

To be honest, I’m quite new to Scribe Software. I just recently started working with the product because I need to do a heavy migration for a project at work. The standard Microsoft Data Migration Manager was not an option so I started looking for other 3rd party products. That’s where Scribe came in the picture. I’m quite enthusiastic about the product. If you need convincing, send me an email or post a comment.

This blog post will discuss how to migrate binary files from a Microsoft SQL Server to Microsoft Dynamics CRM. The attachments, files, will be placed in the notes section of an entity.

First off, let’s look at the SQL Server.

This is what my database structure looks like:

CREATE TABLE [dbo].[Files](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [FileName] [varchar](50) NOT NULL,
    [FileData] [varbinary](max) NOT NULL
) ON [PRIMARY]

The actual file is, like you would guess, in the varbinary datatype.

In Scribe we want to connect to this table, this will be our source. Our target will be the Microsoft Dynamics system.

image

On the left you will see that I’m connected to the SQL Server. This is done via an ODBC connection that I have set up. On the right, I’m connected to the Annotation entity of the Microsoft Dynamics CRM system. Notes in CRM are stored in a separate entity and the relation is created by setting the object id to the GUID of the object where your notes need to be shown.

I will not dive into the details on how to setup a source or target. That’s not the purpose of this post.

On the bottom, in the data links section, you’ll see that I did a reference lookup in the internal Scribe database to locate a GUID of an organization migration which I had done previously. For this demo I want to attach the files from the database to the Notes section of my Account entity.

The actual file data needs to be stored in the vfAttachment attribute. The blob data will be stored here. The filename can be set optionally.

Another thing that you definitely should not forget to set is the objecttypecode attribute. If you forget this Scribe will complain with the following error message: CreateEntity failed: The parent’s object type is invalid.

Make sure to set it to one, using the formula button.

Once you are done, you will see the following when you want to test your DTS. The GUID is retrieved and the BLOB data will nicely be stored.

image

Run the job and your file will be attached to the Notes section of your entity:

image

Dynamics CRM2011 Release Candidate released

Seems that the release candidate bits have been released to Microsoft Download. Looks like they already have been published a couple days ago too. Anyway, I just saw the news via Twitter. As you know this is not yet the final version. RTM will come soon though, I think it’ll be around the end of January.

Here are the download links:

Microsoft Dynamics CRM 2011 Server Release Candidate
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c3f82c6f-c123-4e80-b9b2-ee422a16b91d&displaylang=en

Microsoft Dynamics CRM 2011 for Microsoft Office Outlook
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=22dc423a-7194-491e-a169-6ace16bfdd36&displaylang=en

Microsoft Dynamics CRM 2011 Language Pack
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=db44c564-2338-407e-980a-c9c83ad37729&displaylang=en

Microsoft Dynamics CRM 2011 E-mail Router
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a995f6ad-0099-42fd-9b22-cf7b3d40a2bf&displaylang=en

Microsoft Dynamics CRM 2011 Report Authoring Extension
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=64a09b75-8376-4b9d-aea3-8a83a1837c4d&displaylang=en

Microsoft Dynamics CRM 2011 List Component for Microsoft SharePoint Server 2010
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=23c0f351-8694-4d92-9ddf-34a949aec6a7&displaylang=en

 

To help you with the installation, some handy installation guides:

Microsoft Dynamics CRM 2011 for Outlook Installing Guide (Online)
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a4c4c297-5df5-4233-af93-9f488d63805b

Microsoft Dynamics CRM 2011 E-mail Router Installing Guide (Online)
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ec184209-991c-4cd6-a127-bf14cbc4094b

How to expand a Virtual PC VHD

Today I wanted to install SQL Server 2008 on one of my demo images. The problem was however that I was running out of free space on my local C: drive. Too bad because upgrading SQL Server 2005 to SQL Server 2008 required some gigabytes. (Not sure how much it was exactly).

I did a lot of searching and using diskpart, GParted was suggested quite a lot ..However, nothing seemed to work exactly for me. Gparted just gave errors after a while of converting (took a long time too), diskpart just said that I could not extend the volume.

First things first: expanding the VHD. For this you need VHD Resizer from VMToolkit. You can download that following the link.

1) Select your original VHD file

2) Adjust the size

3) Click resize

With VHD Resizer, you create your new & bigger VHD.

Once created you need to go to Virtual PC – Settings and change your previous VHD with the new one.

Now comes the expanding part..it does require 3rd party tools. The good news is, if you are running XP, Vista or Windows 7 then the tool is completely free. If you are using a windows server OS then you’ll have to cough up the dough. But let me tell you something, I spent (wasted) a lot of time trying to expand the drive. I’m so happy about this tool that I just had to write about it. I opened the tool, selected the drive, selected the command, confirmed my actions and 5 seconds later my disk was expanded.

The tool that I’m talking about is EASEUS Partition Manager. You can download or buy the application on this link. Steps you need to take are:

1) Select your volume

2) Select the resize command in the toolbar

3) Adjust the size (using the unallocated size available) using the simple slider

4) Apply changes

5) Done

It’s quick and it works. Just the way I like it :)

Things to read: 12/05/2010

Visual Studio 2010 presentation posted to SlideShare

Earlier this month I did a presentation on Visual Studio 2010 for the company I work for. I kinda forgot to upload the slides right after. Busy period.

So here are the slides. If you have any question let me know.

This presentation covers the following topics:

- Visual Studio 2010 IDE enhancements/changes

- Architecture possibilities

- New debugging experience (IntelliTrace, Breakpoints enhancements, datatips)

- What’s new for Testers?

PS: If you want to have some more detailed information on testing in Visual Studio 2010 and TFS 2010, check out Slide Deck from Whats New for Testing in Visual Studio 2010 and TFS 2010. Webcast of this presentation can be found here: Whats New for Testing in Visual Studio 2010 Webcast

- Extending Visual studio

- Other new features

Looking for Crystal Reports for Visual Studio 2010?

Well Crystal Reports isn’t included in VS2010 by default any more. From now on you need to download Crystal Reports from SAP.com. The good thing however is that you will be able to download this free, without any registration required. That’s good news, right?

So if you want some more information on this new release for VS2010, check out Crystal Reports in Visual Studio 2010 on sap.com. Or if you don’t want to get started, you can download Crystal Reports for VS2010 here

Visual Studio 2010 has been released!!

It’s out there!!

from Soma’s site

The new release of Visual Studio 2010 has plenty of compelling new features and updates that will make every developer more productive.

· Visual Studio 2010 allows users target of the right platform for their application, including Windows 7, Windows Server 2008 R2, SQL Server 2008, SharePoint. Office, Windows Azure, and Windows Phone 7 applications using their existing skills.

· Visual Studio 2010 is a rich, personalized development environment. We know that software developers spend much of their time in the IDE, and features like the new editor and multi-monitor support make your time in Visual Studio more productive and enjoyable.

· Teams are able to work more efficiently using Application Lifecycle Management tools. We’ve done a great deal of work in Visual Studio 2010 to improve testing and debugging tools. Features like IntelliTrace and easy project management help your team ensure high quality.

It’s really cool that you could follow the keynote live and even ask questions via Twitter.

image

MS SQL Server Samples

Looking for some sample data to populate your database (SQL Server 2005/2008/R2, SQL Azure) with? Have a look at this link on CodePlex

10 Hands on labs for Sharepoint 2010 development

Use these 10 hands-on lab manuals for SharePoint 2010 to get started learning SharePoint 2010 development. Each lab is available in C# and Visual Basic.
HOL01 - Developing a Visual Web Part in Visual Studio 2010
This hands-on lab introduces the Visual Studio 2010 SharePoint development environment. It shows how to build a Visual Web Part using LINQ to SharePoint, and how to connect one Web Part to another Web Part on the page.
HOL02 - Developing a List Definition and Event Receiver in Visual Studio 2010
This hands-on lab walks you through building a list definition for SharePoint 2010 in Visual Studio 2010. It also shows how to build an event receiver for the list in Visual Studio 2010 and deploy it to SharePoint. After the list and event receiver are deployed, you can use the developer dashboard to evaluate the performance of the event receiver.
HOL03 – Developing Advanced Web Parts for SharePoint 2010 with Visual Studio 2010
This hands-on lab shows how to build a Web Part using several SharePoint-specific controls in Visual Studio 2010. Investigate advanced built-in Web Parts, including the Data View Web Part.
HOL04 – Developing with LINQ to SharePoint in Visual Studio 2010
This hands-on lab explores a variety of LINQ queries on SharePoint 2010, going into more depth than the introductory hands-on lab. It also walks you through an exercise of creating a custom content type in Visual Studio 2010.
HOL05 - Developing for SharePoint 2010 with the Client OM and REST in Visual Studio 2010
This hands-on lab introduces the Client object model for use in calling SharePoint 2010 APIs from a client machine. It also shows the use of ADO.NET Data Services to call REST services in SharePoint 2010.
HOL06 – Developing a BCS External Content Type with Visual Studio 2010
This hands-on lab walks you through building an external content type for Business Connectivity Services using Visual Studio 2010. It also builds a form for Microsoft Outlook and shows the data being edited offline in Outlook.
HOL07 – Developing a SharePoint 2010 Workflow with Initiation Form in Visual Studio 2010
This hands-on lab walks you through building a workflow in Visual Studio 2010 for SharePoint 2010. You add an initiation form to the workflow and use an external data exchange activity in the workflow.
HOL08 - Developing SharePoint 2010 User Interface with Silverlight in Visual Studio 2010
This hands-on lab walks you through building Microsoft Silverlight applications for use in SharePoint 2010. You will access SharePoint 2010 data in Silverlight using the Client object model.
HOL09 – Developing SharePoint 2010 Sandboxed Solutions in Visual Studio 2010
This hands-on lab walks you through building a Sandboxed Solution Web Part for SharePoint 2010. It will also add code to the Web Part that overloads the limits placed by the sandboxed solution, and you will review how the solution is shut down.
HOL10 - Developing SharePoint 2010 User Interface Ribbon and Dialog Customizations
This hands-on lab walks you through adding a custom action to the SharePoint 2010 ribbon, and creating a Web Part that uses the Dialog Framework.

Download them on Microsoft Download

Employee Info Starter Kit (v4.0.0) with HttpException

So I wanted to have a look at the new Employee Info Starter Kit. This sample application covers some of the new technology that you can use with ASP.NET Webforms. You can download the sample application here. So I extracted the package, set the correct start up project and started the application. All of a sudden, before the application actually started up, I’m greeted with this exception:

System.Web.HttpException (0×80004005): Session state has created a session id, but cannot save it because the response was already flushed by the application.\r\n   at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded)\r\n   at System.Web.SessionState.SessionStateModule.CreateSessionId()\r\n   at System.Web.SessionState.SessionStateModule.DelayedGetSessionId()\r\n   at System.Web.SessionState.SessionStateModule.ReleaseStateGetSessionID()\r\n   at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)\r\n   at System.Web.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs)\r\n   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Seems like there is something wrong with the session. Opened up my favourite browser and did some searching. Some minutes later, I had found the solution and here it is..

Open Global.asax and make sure the Session_Start method looks like this:

protected void Session_Start(object sender, EventArgs e)
{
   string sessionId = Session.SessionID;

   if (!Eisk.DataAccessHelpers.ConnectionStringManager.IsConnectionStringOk())
       Response.Redirect("~/public/install.aspx");

}

That should solve the problem! More info can be found here

« Vorige paginaVolgende pagina »