CRM 2016 – How to find the default currency without going into Office 365

Before you do anything, always stop to think #HoskWisdom

I was tasked with moving a customisations, data and config from one CRM Online instance to another.

I was only a CRM System Administrator and didn’t have access to Office 365.  I was checking some of the settings and wanted to know the default currency.

The default or base currency is set when you create your Microsoft Dynamics CRM instance, it’s usually set to the country where the organisation is based.

If you add more currencies you have to keep the exchange rate up to date but CRM calculates all values in the base currency and converts them using the exchange rate on the screen.

If you want to learn more about currencies in CRM this blog is excellent

Investigation

I headed over to check the currency section of Microsoft Dynamics CRM

Settings –> Business Management –> Currencies

Currencies

Having two currency fields meant I didn’t know which one was the base currency field

I tried to use the FetchXML builder to see if there was a field which specified which currency was the default currency but there isn’t.  I never realised the Currency entity has the schema name of transactioncurrency.

Using my Sherlock detective skills the currency with the earliest CreatedOn date would be the first currency record and likely to be base currency.  I’m guessing the base currency would be the one with 1 exchange rate.

Currencies 1

I didn’t want to guess because assumptions can cause problems and bugs in Microsoft Dynamics CRM.

I decided to open the currency records and when I opened GBP and it told me it was the base currency.  The exchange rate is read only

Currencies 3

The EUR exchange rate was editable and it didn’t tell me it was the base currency.

Currencies 2

Hosk’s Top CRM Articles of the week – 27th May

Quotes

if you had more time you could do all the things you wanted. You only have time to focus on one thing you really want to do

#HoskWisdom

Great minds discuss ideas; average minds discuss events; small minds discuss people.

Eleanor Roosevelt

 

Article of the week

Jukka Niiranen has been busted some moves with Sway recently, almost enough to make me want to use it.

Sway is like a cool Powerpoint, I learnt Salesforce has 5 times the market share of CRM (19.7% Salesforce, 4.3% Microsoft).  It’s a great Sway presentation and the information makes you think where the CRM industry is heading in the future

Best of the Rest

Dynamic CRM Salary survey 2016

Thoughts on Microsoft Dynamics CRM Strategy

Three new features of Microsoft social engagement 

Leon Tribe on ADX Portal

Use Machine Learning to Predict Customers You Might Lose (Part 1)

Managing Microsoft Dynamics CRM 2016 online service updates

Data Loader

Dynamics Connector is being discontinued, What does it mean?

Article from technology professional Mitch Milam- summarizing the new features

CRM 2015 – What developers need to know about the activity entity

Project Service and Field Service trials now available as solutions for CRM2016 Update 1 orgs

If Bob Paisley managed a CRM team

Here’s your guide on how to enable and create your first survey with Dynamics CRM 2016 VOC.

How to free storage space in CRM2016 

What’s new with Dynamics CRM 2016 and CRM online.

Field Data Auto-complete  

Create Custom Page Template in Adxstudio

Why Microsoft Dynamics CRM presentation

CRM 2016 – Default CRM mobile app works fully offline and the limitations of previous offline versions

Microsoft Sets the Stage for IoT-Enabled CRM 

The rise of Microsoft Dynamics CRM

{Dynamics CRM 2016 Update 1} Organisation Insights Dashboard in Dynamics CRM

Questions on Microsoft Dynamics CRM solutions and environments

Are you aware about this? Dynamics CRM New Feature – Templates for Email Signatures

Struggling with the implementation phase? Here’s How to implement CRM through Phased Approach

CRM developers tools of the trade – ReSharper

Blog Post: salesforce – Hell Freezes Over

other

Ted Talk – Why some of us don’t have one true calling

US government is spending billions on old tech that barely works, says watchdog

“We no longer talk about the lagging indicators of success, right, which is revenue, profit. What are the leading indicators of success? Customer love,” Nadella says.
Whilst on the train I was reading Microsofts Earnings Release FY16 Q3
There were a few interesting things to note
REDMOND, Wash. — April 21, 2016 — Microsoft Corp. today announced the following results for the quarter ended March 31, 2016:
· Office commercial products and cloud services revenue grew 7% in constant currency driven by Office 365 revenue growth of 63% in constant currency
· Office consumer products and cloud services revenue grew 6% in constant currency with Office 365 consumer subscribers increasing to 22.2 million
· Dynamics products and cloud services revenue grew 9% in constant currency with Dynamics CRM Online seat adds more than doubling year-over-year
 Dynamics CRM Online seat adds more than doubling year-over-year

Salesforce (CRM) Chooses Amazon (AMZN) For Cloud Services In $400 Million Deal

Useful Hosk Links

Hosk list Of CRM 2013 Tools

A list and review of CRM 2013 tools, this will probably work in CRM 2015 as well

Hosk’s CRM Developer Articles

A collection of my favourite CRM Developer articles I have written

MB2-703 – CRM 2013 Customization and Configuration Certification Information

All the CRM 2013 content to help you pass the exam

HoskWisdom – Hosk Developer Quotes

 Words of Wisdom from the Hosk.  I have written over 900 articles, surely I should have said a few memorable things

Thoughts on Microsoft Dynamics CRM Strategy

All failure is failure to adapt, all success is successful adaptation.”
― Max McKeownAdaptability: The Art of Winning in an Age of Uncertainty

Strategy is about shaping the future.  Look at how you can win, where the opportunities are, create actions develop knowledge, skills and resources to deliver the strategy.

Strategy is important because what brought a company success in the past might not work in the future, you must keep evolving at a company.

Successful companies are those who adapt to their changing environments, those who understand the direction of an industry, create and deliver strategies suited to opportunities arising from change.

“Change is inevitable, progress is not.”
― Max McKeownThe Truth About Innovation

Do I need to know about strategy

Individuals need strategies to progress, the skills and knowledge you have might not be in demand in the future, you must learn new skills, technologies to adapt to new roles.

You might think I don’t need to know this, it doesn’t affect me, I go to work, do my job and go home at 5.30 but what about?

What technologies will in the next Microsoft Dynamics CRM project, it could be CRM Online, portal, Azure services, Machine learning, gamification.  Could you deliver this project or will they need to hire someone else?

What are you going to learn next? if you pick one new technology used in Microsoft Dynamics CRM which is it? why did you choose that? is it the best choice?

You are making strategic decision’s daily but if these are not linked with your future vision, you could be investing your time and energy into areas not helping to progress your career.

Plain and Simple

I’m reading the excellent book Leadership:Plain and Simple: Plain and Simple (2nd Edition).  It discusses when John Harper become UK Managing director of Hasbro (a global toy company), when he came in things were in bad shape, losing money, morale and confidence were low.  His plan was to energise and engage the workforce.  He closed the company for a day and they discussed the ideas

  1. What is the future we want want and how great can we be?
  2. How do we play to win and perform at our best
  3. How do we build relationships internally and with customers, so we can deliver the future together as a team.

The questions are direct and decisive, they create a vision of the future and create a strategy to make it happen.  A leader cannot do the work himself, he needs to inspire the workforce deliver the vision.

These quotes highlight the role of a leader and limitation of a leader because without an engaged workforce they have no one to implement the strategy

A leader has the vision and conviction that a dream can be achieved. He inspires the power and energy to get it done.”
— Ralph Lauren

“A leader’s role is to raise people’s aspirations for what they can become and to release their energies so they will try to get there.”
— David Gergen

The book Playing to Win: How Strategy Really Works simplifies strategy to these two questions

  1. Where to play?
  2. How do you win?

Successful companies answers to these two questions seems obvious

Apple

  • High end smart phones and gadgets
  • beautifully designed, easy to use, high quality gadgets

Facebook

  • Social interaction
  • easy to use, different methods

Microsoft and Microsoft Dynamics CRM

To help me understand the questions I would answer the questions if I was head of the Microsoft Dynamics CRM division.  I wrote about the evolution of Microsoft Dynamics CRM in the blog The rise of Microsoft Dynamics CRM

1 – What is the future we want want and how great can we be?

The Microsoft Dynamics CRM strategy filters down from the global strategy of Microsoft – Mobile First, Cloud First.

  • The future for Microsoft Dynamics is Microsoft Dynamics CRM Online.
  • Improve the Microsoft Dynamics service,  redesign the internal design of to incorporate azure’s scalability to improve performance.
  • Improve the mobile functionality to match Resco
  • Microsoft Dynamics CRM act as a hub, linking to many specialist services (Machine learning, Big data analysis), Microservices/app structure.
  • Portals used more, allowing CRM deployments to offer self service portals, contractor functionality and extending CRM to none CRM users.
  • Social CRM to really take off

2.  How do we play to win and perform at our best?

Ask yourself what is Microsoft good at? why do people choose Microsoft Dynamics CRM?  Office Integration, competitively priced, cloud solutions/Azure functionality is world class.  Microsoft are constantly innovating Microsoft Dynamics CRM and surrounding products.

  • Keep improving Microsoft Dynamics CRM
  • Purchase strategic Microsoft Dynamic Solutions/companies
  • Keeping prices cheaper than Salesforce.
  • Microsoft can continue to benefit from improved Azure functionality and an increase in Azure services and data centres.
  • Microsoft must improve their mobile application or buy Resco
  • Strategic purchased of related services.

3 – How do we build relationships internally and with customers, so we can deliver the future together as a team.

Microsoft work hard to embrace Microsoft Dynamics CRM partners and help enable them to sell Microsoft Dynamics CRM (although perhaps more focused on larger partners and enterprise solutions).  The training materials Microsoft offer is pretty good and the Azure training is really good.

Microsoft offer a competitive price for Microsoft Dynamics CRM Online.

Internally hiring the best people who want to make a difference.  Under Satya Microsoft have started to innovate rather than copy.   This outlook should be brought to the Microsoft Dynamics CRM division to create innovative new functionality and have a workforce engaged to deliver it.

Hosk’s Dynamic CRM Practise

How would I answer those questions with my virtual Hosk’s Dynamic CRM Practise and what strategy would I come up with.

1 – What is the future we want want and how great can we be?

When implementing CRM solutions I find lots of cautious companies who wary about signing up for the project due to earlier bad experiences with IT projects and failed CRM projects.  There are many companies who have lost confidence in their existing Microsoft Dynamics CRM supplier.

Microsoft Dynamics CRM companies don’t sell products they sell people, processes, technical knowledge and experience (I know companies who create products).

The future  vision is to create a reputation for being an innovative company delivery quality projects, collaborating with the customer.  You want your CRM company to be the best in their sector and who put quality and customer satisfaction at the top.

It‘s difficult to differentiate through price alone, focus on being the best choice to deliver CRM projects for the customers requirements with regards to experience, vision and capability (skilled people, resources).

When a customer buys CRM from your company

  • you know the reason,
  • the staff know the reason
  • the customer knows the reason.

To win business you must have strengths which other companies cannot match.  Pick an area of expertise and become the best at it

2- How do we play to win and perform at our best

The future for Microsoft Dynamics CRM practices is to specialise in an industry or technological service.  The Microsoft Dynamics CRM industry is crowded with lots of companies offering similar services and at similar prices.  Ask yourself why would someone buy CRM from my company?

  • price?
  • experience?,
  • an existing solution?

Most successful Microsoft Dynamics CRM resellers and the ones Microsoft have purchased, they focused on a specific area and become the market leader.

FieldOne – The best Field Services company in the Microsoft Dynamics CRM space (the only one I know to be honest).  They were so good Microsoft brought them, which is an indication you are doing something right.

Parature – Fantastic self-service portal, knowledge base, which can run alone and is slowly (very slowly) being integrated with Microsoft Dynamics CRM.

FantasySalesTeam – Microsoft Dynamics CRM and Gamefication (Hosk blog –  Is Gamification in a Microsoft Dynamics CRM a gimic?)

Resco – The leading Microsoft Dynamics mobile application/framework (Hosk blog – Why Resco acquiring CWR’s mobile CRM is important)

My strategies

  • Focus on Microsoft Dynamics Online solutions and specialise in delivering complex Microsoft Dynamics CRM projects online.  Align skills with Microsoft’s vision – Mobile, Cloud (Azure)
  • Concentrate on delivering FieldOne projects.  Field services is a growing marketing with Microsoft Dynamics CRM.
  • Get a head with Azure Machine learning and CRM.
  • Focus on 2 sectors, Create solutions to speed up projects.

3 – How do we build relationships internally and with customers, so we can deliver the future together as a team.

You need leaders, who can create a vision, mission and goals and explain this to the organisation.  Everyone should understand what the company strategy is and it’s goals.

Employees

You need to engage the employees so they will deliver the strategy.  Fully engaged employees not only understand the strategy but add to it with ideas, energy and hard work.  Engaged employees feel valued, listened to and believe they are making a difference, this leads to quality work.

If you think about the difference in amount and quality of work when you were engaged on a project compared to other projects, the difference is huge.

Staff must have the skills/training to deliver projects to high standards, customer satisfaction is vital.  The focus is on quality projects, quality individual performance and constant improvement.  In the Microsoft Dynamics CRM industry you are mostly selling people.  Happy, motivated and engaged in order to deliver great projects.

Team is important in Microsoft Dynamics CRM community, the number of technologies/products and services used in Microsoft Dynamics CRM projects is growing, the team must collaborate, talk, support and share knowledge to deliver quality projects to meet customer expectations and enhance the reputation of the company.

Customers

Great relationships with customers come from delivering projects which meet business requirements and delivered on time.

Conclusion

Writing this article helped me understand I haven’t thought deeply about the subject before and my  thoughts and ideas were other people’s or snippets of articles I had read.   I could see some of original thoughts on the subject emerging but more work is needed to come up with a viable strategy for the Microsoft Dynamics CRM industry.  I’m not sure my Hosk CRM practise would have done particularly well with the strategy outlined above.

It‘s difficult to create strategies without understanding the current Dynamics CRM market, identifying where the Dynamics CRM industry is heading and what opportunities are available.

I hope you found the article interesting, please leave some comments on the subject

If you are interesting in learning more, I recommend these two books

ALL VIEWS AND OPINIONS ARE PERSONAL OPINIONS OF THE HOSK 

CRM 2016 – How to rename the default business unit

Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time. Thomas A. Edison

I came across an annoying bug, I couldn’t rename the Default business unit because the parent business unit is mandatory.

History of default business unit renaming

The renaming of business units is a long and extremely interesting subject…..said no one ever.

The default business unit or parent business is automatically created using the name of your organisation.  In CRM 4 I don’t think you could rename any business units.

In CRM 2011 they allow you to rename business units which were not the default

CRM 2011 – You can rename and delete business units

In CRM 2013 (according to my study notes) you couldn’t rename the default business unit in CRM 2013

CRM 2013 – MB2 703 – Manage user access, Teams and sharing

Another interesting fact

default business unit team cannot be re-parented, deleted or renamed and it’s members cannot be modified.

In CRM 2015 you could rename the default business unit, well it’s possible but Microsoft make it difficult for you to do because the parent business is a mandatory field but if you are editing the default business unit it has no parent business unit, which means you can’t save the record.

CRM 2011 forms?

I tried using God Mode JavaScript shortcut but this didn’t work and I’m guessing this might be because this form is an old school CRM 2011 style form?  What is it doing in CRM 2016!

rename business unit 2

You can see the annoying required Parent Business unit field

Solution

There are a few ways to resolve the problem but the easiest way is to go to

  • Settings –> Customization’s
  • Entities –> Business Unit
  • Open the field – Parent Business – parentbusinessunitid

rename business unit

  • Change the Field Requirement from business required to optional

rename business unit 1

  • Save and publish customisations.
  • Change the name of the Default Business Unit – Save
  • change the Field Requirements of the Parent Business field back to required and publish

Mission accomplished

If at first you don’t succeed, try, try again. Then quit. There’s no point in being a damn fool about it. W. C. Fields

 

The rise of Microsoft Dynamics CRM

human-evolution

If evolution really works, how come mothers only have two hands? Milton Berle

Microsoft Dynamics CRM has evolved at a frantic pace in the last 6 years I have been working with it.

The effort and development put into the product means it’s exciting to work with because Microsoft Dynamics CRM is constantly being improved, new features added, new companies purchased and add on’s created.

For people who use Microsoft Dynamics CRM to deliver customer projects it means you need to work hard to keep up

  • Understand how new features work, where and when they should be used
  • Create code correctly, so it can be upgraded
  • Learn new products Microsoft has purchased, ADXStudio, Parature, Field Services, Microsoft Dynamics Marketing, etc, etc.
  • Take Microsoft Dynamics CRM certifications for each version
  • Learn the differences between CRM online and CRM on-premise

I have blogged why it’s important to keep up to date before and the benefits

Should you keep up with releases and how?

Rapid rise

Microsoft had arrived to the CRM game late and launched CRM 1 in 2003 and stuttered along slowly.  The Microsoft Dynamics CRM wikipedia page notes CRM 3 was the first which saw reasonable uptake by customers.

I started working with Microsoft Dynamics CRM 4 released in 2007, which was a good place to start because the previous versions have been described as difficult to work with by colleagues.

Microsoft released a version of CRM Online and CRM 4 saw Microsoft pass 1 million users.

What I have enjoyed about working with Microsoft Dynamics CRM is the speed and breath of change in the product.  During CRM 2011 onwards Microsoft have developed the front end and back end of Microsoft Dynamics CRM at a frantic pace.  It makes working as a CRM professional challenging dealing with the new versions and changes, often leading to upgrades needed all customization to be rewritten.

Looking at the releases it struck me the speed of innovation and releases of Microsoft Dynamics CRM.

In 5 years Microsoft has released 4 new versions of CRM

  • CRM 2011
  • CRM 2013
  • CRM 2015
  • CRM 2016

Screen shots

Looking at the screenshot of CRM 4, makes me feel nostalgic and glad I don’t have to use CRM 4 anymore

CRM 4

Here is the sexy CRM 2015/2016

CRM 2016

CRM 2016 form

The head start Microsoft gave it’s CRM competitors has had moved from challenger in 2007 to leader in 2015.

The post from Leon Tribe on Gartner Trajectories of CRM solutions shows the gradual move from Microsoft Dynamics CRM.  The picture is taken from Leon Tribe’s post in June 2007 was a challenger and the Microsoft Dynamics CRM Online doesn’t even get a mention!

The Gartner Magic Quadrant shows Microsoft Dynamics having both its online and on premise versions in the leader category and recognized as winner in the CRM magazines Market Leader wards.  Microsoft kindly highlight these in their Analyst coverage page, below I have shown two

Gartner Magic Quadrant for the CRM Customer Engagement Center – read report

In recent years Microsoft has focused on improving the CRM online functionality and administrator tools to where the differences in on premise and cloud are negligible.

SalesForce

Microsoft started behind Salesforce but have been catching up the functionality with every release and now the product functionality is similar, it‘s difficult to say there is one clear winner.  The advantages Salesforce has over Microsoft Dynamics CRM is its large customer base, created due to its head start.

There are some good comparisons between Microsoft Dynamics CRM and Salesforce

Microsoft CRM Professionals view Salesforce as the main competitor to Microsoft Dynamics CRM, for tenders you are competing with Salesforce.  Microsoft made an unusual move in 2015 and partnered with Salesforce, causing confusion in the Microsoft Dynamics community.

I wrote a blog post – Why did Microsoft partner with Salesforce?

There were rumours Microsoft was trying to buy Salesforce

I can understand why Microsoft attempted to buy Salesforce

getting rid of the competition

stop wasting money competing agaisnt each other

Create shared services

Microsoft can create products/services to be used by both CRM services e.g. Azure services, Office products, PowerBI, etc.

It‘s the same tactics Resco used when buying CWR mobile CRM activities

Why Resco acquiring CWR’s mobile CRM is important

Microsoft CRM Online is growing

Microsoft is focusing on the Microsoft Dynamics CRM Online version and according this press release, Microsoft CRM is growing fast

Dynamics products and cloud services revenue grew 9% in constant currency with Dynamics CRM Online seat adds more than doubling year-over-year

Cloud solutions are growing in popularity with customers and CRM Online solutions are growing in complexity as developers understand the limitations of Microsoft Dynamics CRM Online and how do you work with them?

Solution architects are improving at designing cloud solutions and integrating with Mobile devices.

Conclusion

Microsoft Dynamics CRM has evolved as a product and the type of CRM projects are changing, there are lots more cloud solutions, mobile devices and portals.

In the future projects could involve machine learning, big data and integration with lots of devices and plugging into the Internet of things.  The social CRM functionality keeps growing in CRM.

With change comes opportunity but take advantage you must be prepared to learn new skills and approach CRM projects differently.

picture from thezoom 

Source control and Visual studio team services

Do the right thing. It will gratify some people and astonish the rest. Mark Twain

VSTS – Visual studio team services, previously known as Visual Studio Online

Developers have to use source control and system to manage bugs.  I have used lots of source control over the years

  • Visual Source Safe
  • CVS
  • GIT
  • Subversion

I have set up source control, versioned, branched and of cause suffered merge hell.  Source control features on The Frustrations of a CRM Developer.

Source control has saved my bacon many times.  I worked at one company which didn’t use source control, which was extremely scary.

Like most applications they get picked up and moved to the cloud and made into a service. Personally I’m beginning to prefer services because it takes the pain of hosting and maintaining a server and you don’t need to go through an IT team to fix problems.

Most developers refer to it as TFS, the team services has not caught on yet and is adding to the confusion at the moment.

When TFS/VSTS is done well its a benefit, a central location for work items and bugs, offering a way to log and maintain your work items. It’s used to create release documents (blog link), link work items with code and offer a history for bugs.

When TFS/VSTS is done badly is a curse, it slows things down and can be difficult to get developers to use.

Start as you mean to go on and get it right at the start of the project.

It takes effort but it‘s best to start a project or phase by putting all the user stories, solution backlog or work items into VSTS/TFS at the start.

  • it sets the standards for everyone
  • all development and work on requirements/bugs is captured, you have a history
  • burn down is done using graphs out of the box
  • once setup the effort to maintain is minimal

As a developer VSTS gives you a history of the effort in developing and for bugs it leaves an audit trail of effort.

It‘s always good to have information in central systems rather than people’s computers and heads because it allows work items/bugs to be picked up by other developers.

VSTS allows users to raise bugs directly and monitor progress, this self service functionality can save hours of keying information from emails and phone conversations.

One final great use of VSTS is to create release notes by exported fixed bugs from VSTS, which I blogged about below

CRM 2015 – Best practices for CRM Deployments 

One unusual aspect of VSTS is it charges you for building the solution by the minute.  I’m not sure about charging for builds, it doesn’t seem right

VSTS Training

Microsoft has good training resources for VSTS, a great overview and 3 hours of video training.

Overview with documentation

Video tutorial

 

How are you going to test the logic of your code

Simple systems are not feasible because they require infinite testing. Norman Ralph Augustine

Developers must be able to isolate and test their code easily and often in their own development environment.  If you don’t test your code you will let more bugs into production environments and this will cost you more time and effort in the long term.

Developers must be proud of their work, be craftsman and create quality code.  Poor quality code is a drop in standards which can spread to multiple developers like a virus – Bad code is like a virus, don’t get infected.  As a team/group you can choose to raise standards and get all members to raise their game or you can let standards drop.

Keep your standards high, your code quality and Never leave a CRM developer stranded

Questions

I get questions from Hsok CRM blog readers asking me to resolve problems they are having or asking for advice.  Below are two good examples

If I could offer some advice about asking questions

  1.  Be polite, say hello, how much you love my blog and then your question 🙂
  2. Investigate the problem yourself first.  Google the problem, try things, ask your friends/colleagues and then if you still have problems ask the problem on the CRM forum
  3. Provide me (and the CRM forum) with as much information about the problem as possible e.g. CRM version, what you are doing and why, what you have tried, the results of your research.  More information = greater chance of someone/me helping you.

I received an email from Martin who had read my blog posts on unit testing with Microsoft Dynamics CRM

Martin was working on writing a webservice and found unit testing was a great way to test the logic of the code without having to deploy the code in the production environment which was tricky.

Isolate the logic of your code

Logic is the beginning of wisdom, not the end. Leonard Nimoy

 

Unit testing is about isolating and testing the logic of your code.  The main benefits of unit testing

  1.  You think about designing and structuring your code to make it easy to test the logic
  2. You and any developers can rerun your tests
  3. It’s easier to refactor the code because you can test it still works.
  4. Developers who unit test, think more about what they are testing

Thinking about what you are doing, questioning how you are designing the code and thinking about what the code is doing helps create better code.

First draft code works but is sloppy and complex with lots of dependencies.  First draft writing, you must edit your work to remove sloppy code and improve the overall code quality.

UNIT TESTING ALLOWS YOU TO EDIT CODE AND BE ABLE TO TEST THE CHANGES

If you haven’t got unit tests, you might break the code and not know about it, unless you test the code and all areas which uses the code.

How do you know the logic works

When a junior developer has written a plugin, web service or piece of code, I always want to know how they have tested the code works.

Before I started writing unit tests, I used to have a console application which connected to the development CRM environment and ran my plugin code.  I could do this because I wrote the plugin code as a separate piece of code which was passed a CRM connection and entity.

If you cannot run through the logic of the code on your own dev environment then you are making it difficult to test.  Difficult tasks are often not done by developers short on time.

Unit tests are the best way to test the code but a console app so you can step through the code is a good second.

 

Martin’s email about the

Use Case for Mocking WebServices

Hi Hosk,

Unit Testing is at first somehow abstract but we had some requirements to use a 3rd party WebService, where Mocking saved us a lot of time.

The WebService-Provided only allowed connection from whitelisted IP’s. Our customer only ordered the smallest Internet Package from his ISP.

Every 24 hours the customer had a new public IP. So we couldn’t get a connection form the cooperate network. Upgrading the ISP-Packing was also impossible.

The Webservice-Provided refused to add the whole ISP-Subnet. Our customer had already an Azure Cloud Service with a reserved (static) IP. So we decided to deploy our Code there.

Deploying and debugging is somewhat unhandy in this scenario. It take approximately 15 Minutes to deploy the Cloud Service and start Debugging.

I decided then to Mock the SOAP-Service so I could easily develop locally. This was a big time saver.

Maybe this Story helps other to understand what you can also address with Unit Tests/Mocking. Another possible Use Case for it is when you only have a production System and don’t wan’t to mess it up or when you must pay for every requets you submit to the 3rd Party WebService.