using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(“Please enter your target:”);
int UserTarget = int.Parse(Console.ReadLine());
int Start = 0;
while (Start <= UserTarget)
{
Console.Write(Start + ” “);
Start = Start + 2;
Console.ReadLine();
}
}
}
}
===============
DO WHILE LOOP
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(“Please enter your target:”);
int UserTarget = int.Parse(Console.ReadLine());
string UserChoice = ” “;
int Start = 0;
while (Start <= UserTarget)
{
Console.WriteLine(Start + ” “);
Start = Start + 2;
Console.ReadLine();
}
do
{
Console.WriteLine(“Do you want to continue – Yes or No”);
UserChoice = Console.ReadLine().ToUpper();
if (UserChoice != “Yes” && UserChoice != “No”)
{
Console.WriteLine(“Invalid Choice, Please say Yes or No”,UserChoice);
}
} while (UserChoice != “YES” && UserChoice != “NO”) ;
}while (UserChoice == “YES”);
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
int TotalCoffeeCost = 0;
Start:
Console.WriteLine(“Please select coffee size: 1-Small, 2- Medium, 3 – Large”);
int UserChoice = int.Parse(Console.ReadLine());
switch(UserChoice)
{
case 1:
TotalCoffeeCost += 1;
Console.ReadLine();
break;
case 2:
TotalCoffeeCost += 2;
Console.ReadLine();
break;
case 3:
TotalCoffeeCost += 3;
Console.ReadLine();
break;
default:
Console.WriteLine(“your choice {0} is invalid”, UserChoice);
Console.ReadLine();
goto Start;
}
Decide:
Console.WriteLine(“Do you want to buy another coffee – Yes or No?”);
string UserDecision = Console.ReadLine();
switch(UserDecision)
{
case “YES”:
goto Start;
case “NO”:
break;
default:
Console.WriteLine(“Your choice {0} is Invalid . Please try again…”,UserDecision);
goto Decide;
}
Console.WriteLine(“Thank You for shopping with us”);
Console.WriteLine(“Your bill cost = {0}”, TotalCoffeeCost);
Console.ReadLine();
}
}
}
Adxstudio Installation and Initial Configuration of the Portal
- Cloud: In this scenario the website will be hosted on the cloud, and we won’t have control over the code.
- Local Installation: In this scenario, we host the website and we have complete control over the code.
- Download the latest version of ADXstudio from https://demo.adxstudio.com/
- Install the downloaded software and it will copy a set of files into your machine. Please note the location (by default it will be in C:Program Files (x86)Adxstudio).
- Log on to your Dynamics CRM Online account
- Click on Dynamics CRM Ribbon and then select Settings > Solutions.
- Click on Import Solution and then click on Browse.
- Navigate to the folder where ADXStudio files were copied upon installing ADXStudio.
- Select AdxstudioInstaller.Zip file and click on Next. Please take a look at the screen shot below for location of AdxstudioInstaller.Zip.
- Click on Import and finish the import process.
- Once the installation is over, you can see ADXSTUDIO INSTALLER on your solution screen as shown below.
- Next we go and download customer portal to our CRM Instance.
- Click on CRM Ribbon > Settings > Solutions and click on ADXSTUDIO INSTALLER. This will open another screen which will take you to ADXStudio installation page.
- Click on the left hand menu and select website gallery as shown in the image below.
- In the next screen, click on the Install button beside ADXStudio Portals customer portal as shown in the image below, and then click on the blue install button at the bottom of the screen.
- The wizard will import the required files to you Dynamics CRM Instance.
- When the import is complete refresh your Dynamics CRM screen and you can see a portals tab appear on the ribbon.
- Click on the Ribbon > Portals > Websites; you will see the website in your Dynamics CRM Instance.
- The next step is to create a site in your local IIS.
- Open IIS and add a new site as shown below
- In the physical path, enter the path where the ADX files were copied initially when we installed ADXStudio. We need to specify the location of Master Portal, as shown in the screen shot below
- Click OK to close the wizard.
- Next, we need to specify theCRM instance to which this site should connect.
- Right click on the created site and in the quick menu, select Manage Website >Browse as shown in the screenshot below.
- The following screen will pop up.
- Please fill in the required fields and click on Check Connection. Once validated, the following screen will appear.
- Select the portal website from the Adxstudio Portals Website dropdown and click Apply.
- The connection string will be created automatically and stored in the App_Data folder of the physical path for the website. The password will be encrypted so it is safe. Given below is the location of App_Data folder.
- This concludes the Adxstudio installation and initial configuration of the portal.
Planning for your upgrade
- What resources will you need?
Your team will need some environments to do your work. With an On Premise deployment, this can mean new servers, new hosted virtual machines, or new developer virtual machines. Setting up these environments can be costly in both dollars and time, so it needs to be considered as early as possible - How does this affect your current production system?
What happens to the current production system while you upgrade? Will you provide new features and updates while the upgrade effort is taking place? With large migrations, this can cause a LOT of churn and possible issues with merging updates. Your management team will need to consider a code freeze at some point during the process - What steps will you need to take in your migration?
If you have a large solutions that includes a large amount of code with a complex schema, how do you sync the customizations and source code? This does not seem like it would be complicated, but planning out the stages/steps in advance can save time for your development team - What about all of the cool new features?
With major releases, you usually see some new feature that you want to leverage. Some new features may not be relevant while some may be extremely easy to implement. However, other features might require data migration and process changes. Planning time for your team to review new capabilities during the migration can be key to making the most out of the CRM platform - How will you test your migration?
If your current solution is supported and you follow all of the steps provided by Microsoft, it should just work, right? Well, sure… but that is an awful big leap of faith to take with this project! A full regression test of your system will likely be required, so pulling in your end users and QA team as early as possible can help greatly - How will you complete the final migration and deployment?
When everything is complete, your solution is migrated and tested, how will you go about the final deployment? As with any system roll out, your team should plan for down time, end-user testing, remediation, and acceptance. If your upgrade included any data migration or transformation steps, this will need some extra testing and validation
My customer experience, part one
The first thing that Microsoft offers are three approaches to your upgrade. Our team chose the first option listed:
Migrate by using a new instance of SQL Server. We recommend this option for upgrading Microsoft Dynamics CRM Server. Although this option requires a different computer for Microsoft Dynamics CRM 2016 and a different instance of SQL Server, it provides the least amount of potential downtime for users since the existing deployment can remain functioning until the upgrade is completed and verified.
A staged approach
All coming together…
- Migrate the CRM database from CRM 2011 to CRM 2016
- Disable any broken functionality
- Present to the end-user team
- Begin code migration and upgrade
- Evaluate new capabilities available in CRM 2016
- Begin iterative releases to QA and end-user testing
Next steps?
Migrating the Database
Database Migration Steps
- Install new CRM version on target system
- Perform a Full DB backup of current system
- Restore DB to target system database server
- Import Organization using Deployment Manager Organization Import Wizard on target system
- CRM 2011 production -> CRM 2013 staging
- CRM 2013 staging -> CRM 2015 staging
- CRM 2015 staging -> CRM 2016 staging
- CRM 2016 staging -> CRM 2016 production
Migration planning (again!)
- Do you have the sufficient infrastructure in place to upgrade?
- Do you have people on your team to manage the infrastructure?
- Do you have the time required to upgrade the database included in your overall project plan?
Some bumps in the road
- Navigate to Settings -> Customizations and choose Customize the System
- View SDK Message Processing Steps and select View:All to see the Activity Feed plug-in
- Select All SDK Message Processing Steps and Deactivate
Streamline the process
- Disable plugins and workflows – I had assumed that when performing an Organization import, only the database would be affected and the rest of the system was essentially offline. But after running into the issue with the Activity Feeds plugin mentioned earlier, I am assuming that this is not the case! So if you have the option of disabling these during your import steps, I am thinking that it would reduce some of the time to complete. This is one of those items for which I would like to get some clarification. If anyone knows in the meantime, please drop me a line, and I if I get an answer, I’ll update the post.
- Cleanup your DB! – I am sure most reading this have some experience with your CRM databases increasing in size over time. One very popular culprit is the AsyncOperationBase table. The following support article provides details on the issue and some scripts will help to clean things up: Performance is slow if the AsyncOperationBase table becomes too large in Microsoft Dynamics CRM. If your organization has run into this issue, you likely have some of these steps already in place to run periodically. Another clean up script that can clean up some space is to clean up Outlook client sync data. This article by Sean McNellis provides a good summary and the script: Cleaning up CRM Sync Entry tables. These are older posts, but remember that we are running against a CRM 2011 database. I run each of these scripts, and a few other specific to my customer’s system, right after I import the database on the CRM 2013 SQL Server. Here is yet another blog post by Ben Hosking about database cleanup and maintenance: CRM 2011 – Cutting my CRM database down to size This is another topic on which feedback and suggestions are welcome.
- Prune some data – The cleanup steps already mentioned will clean up your database, but what if your system has a LOT of old data that is no longer being used? Does your system have an archive or data warehouse to which you periodically push data? If so, this is an additional step that could shrink your DB and simply give the import process less data on which it needs to work, and moving the backups. This step is completely dependent on your organization’s situation and may simply not be an option because of internal or external regulations, but it is worth investigating early on as it may have an impact on your delivery. Even if it’s only to force your team to review its data, processes, and long-term data management strategies, it’s a good exercise if you can spare the time!
- Just drop some stuff – Once again it’s about reducing the size of the database, but here, you can drop some data temporarily. My customer deals with a large number of attachments and annotations. They regularly use the Note attachments for moving around reports, sharing documents, etc, in addition to their syncing of email with their system that might contain attachments. So the dev team decided that during the their development cycle, we would simply drop all annotations from the system prior to import. Unfortunately, I don’t have the exact number, but during one migration test, the compressed database backup shrank from 50GB to 9GB. This really cut down on moving files around as well as the database restore, and each stage of the import from server to server. For multiple iterations, this really saved us time, but during the actual migration, we will not be dropping the annotations.
- Bump up resources – Throw hardware at it! If you have the resources available, I would suggest bumping up the CPUs and RAM on the target environments. The database restore and the Deployment Manager import wizard can really use a lot of memory and CPU, so an increase during running these times. In my customer’s case, they have a virtualized environment, so they have some flexibility in managing resources. And during the actual go live, planning for these additional resources can definitely reduce your downtime. Even if the calendar time remains, say you block off a weekend for the upgrade, giving the migration team a few extra hours to deal with issues or run tests can be an enormous help.
- Time it accordingly – One point was brought up just today by my customer that I had not even considered, but it can really make a difference, so I definitely want to note it here. During our weekly call, she asked about the timing of when I was testing out latest backup because of possible network latency. Their organization has nightly batch processing that can chew up network bandwidth. Even though the CRM system will be offline during the actual migration, other systems will not. If we decide to perform our migration when the network is slow, it can really eat into our time to complete the upgrade. So this may not be an issue given other networks, but it is definitely a great point to keep in mind when planning!