Quantcast
Channel: Magnetism Solutions Dynamics CRM Blog : microsoft dynamics
Viewing all 651 articles
Browse latest View live

Using fetchXml with Xrm.WebApi.retrieveMultipleRecords in Dynamics 365 V9

$
0
0

Dynamics 365 V9 includes the new Xrm.WebApi helpers that allow you to access the Dynamics 365 Web API without having to create your own requests. The Xrm.WebApi.retrieveMultipleRecords method allows you to easily retrieve records, but the examples on MSDN only demonstrate how to use this using the OData query options. It is possible however to also use fetchXML queries instead.

For this example the fetchXML query we want to use is below:

image

To use this query in the retrieveMultipleRecords function, we first want to encode the fetchXML, as this will need to be valid for use in a URL. We can do this with the encodeURIComponent javascript function. We secondly want to prepend the fetchXML with ?fetchXML= , which will instruct the API that we are sending a fetchXML query.

image

Now that we have our query we can now use it in the retrieveMultipleRecords function like below:

image

Note that the entity parameter and the entity being retrieved need to match, otherwise an error will be returned.

Also keep in mind that Internet Explorer and Edge only support up to 2047 characters in a URL, so very large fetchXml queries will cause an error in those browsers.

In this example we are printing retrieved contacts to the console, which look like this:

image


Ten Strategies to Increase CRM User Adoption

$
0
0

“We’ve decided to implement Dynamics CRM in our business. We believe it will improve what we do. Full training will be provided.”

I hope that this isn’t the usual communication provided by businesses when making the decision to use CRM. I would like to think there’s a bit more fanfare and excitement when the announcement is made!

image

Implementing a CRM can be a big change not only for the business, but users too. It will undoubtedly change the way they do things and helping them understand the positives is essential for a successful implementation. However, that doesn’t mean you can’t make it fun! Here are ten things you can do to create excitement and therefore, user buy-in, around CRM:

  1. Have a fun project name
    Getting users to name the project is a great way to involve them very early on! Some of the names we’ve come across include Wrangler, The Good, The Bad and The Ugly and Yoda!
  2. Create a fun theme
    In the case of project Yoda (which was actually an acronym!), each roll out, training session and document centred around Star Wars. Even the icons in CRM were Star Wars related.  I can confirm that there were lightsabres and even a re-enactment of a fight scene. How could users not get on board?!
  3. Have a countdown
    Make this visible to the business! You could have something as simple as “10 days till CRM” and update it daily. What would make this more effective would be doing something every day for a week leading up to Go Live day; just be sure to make it fun!
  4. Gamification
    Dynamics 365 has a gamification module so if that’s something you’d like to use within your teams, you can get the ball rolling before implementation. Quizzes or games (with prizes!) are a great way to get users on board. Want to know more? Check out this link: https://appsource.microsoft.com/en-us/product/dynamics-365/mscrm.f6d23ec7-255c-4bd8-8c99-dc041d5cb8b3?tab=Overview
  5. CRM Champions
    These people make all the difference. They are your super users and will keep the CRM flag flying high. They are users, but ensure they have influence within the team as they will nip those CRM grumblings in the bud! Most importantly, get them involved in requirements, training and UAT. Also consider setting up a user group post go live to ensure there’s continuous conversations on how to get more out of CRM to improve your business.
  6. Keep it simple
    There’s always the temptation to go overboard but keeping it simple can go a long way to maintaining user adoption. Having a CRM already changes the way they do things so try not to introduce new processes, too many fields on forms, etc. unless necessary. There can always be an enhancements phase!
  7. Training
    Effective training is important; if users don’t know how to use it then there’s very little chance of success. Invest time and resources into training; if CRM is important for your business then your users need to be comfortable with using it. Consider having a wide array of resources available to meet the needs of different users. In some instances, a training document works for some, but videos and online resources could prove more effective for others. Here’s an example of a video blog which could be used to support training:
    https://www.magnetismsolutions.com/blog/davidmochrie/2017/10/24/overview-of-auto-capture-feature-in-microsoft-dynamics-365
    Gauge your audience and their learning needs when deciding.
  8. Post Go Live
    They’re using it but how do you maintain excitement? How about a CRM tip of the day? It’s quick, easy and maintains momentum with minimal effort.
  9. Feedback
    During UAT and Post Go Live, encourage feedback. Users will no doubt have useful recommendations. The most important part is to keep users in the loop. Acknowledge their feedback. Making valuable changes to CRM based on user feedback will strengthen their engagement with it.
  10. Show the value add
    “Implementing CRM will improve our business” What better way to maintain engagement by showing users how the business is improving. Show them the cool reporting, how much knowledge you’ve gained about customers and strategies you’re implementing as a result. Not only will this keep users engaged but will ensure that quality data is entered because they will now understand the importance of it.

CRM will add value to your business but users are your most important asset to drive this.

Workaround for Command Bar Rendering Issue in Dynamics 365

$
0
0

We’ve seen an issue where the command bar was not showing on the form a record was opened in new window. This was a custom entity and version of Dynamics 365 we used was 8.2.0.749.

image

There are two workarounds to solve this issue.

Option 1

In the navigation area displays the Area Name in which the entity is added to, the name of the entity and name of the record. It becomes too long for the form to do the rendering properly, which of course is a bug. But the workaround for this would be to make the names of the Entity and the Area smaller. I renamed General Practitioner entity to GP, and following screenshot shows what the UI looks like.

image

Option 2

Second option is to expand the width of the window to display the buttons in the command bar. However, this may not be an ideal option in terms of the usability as the user will have to expand the window every time to see command buttons.

The following screenshot shows that command bar buttons reappeared by using either one of the above options .

image

The Seven Principles of Software Testing

$
0
0

Principles are rules or values that have been proven over time that provide a foundation for how something works or occurs. Similar to the Principles of Physics or the Principles of Law, Software Testing also consists of principles that have stood the test of time over the past 40 years. I decided to write a blog on these principles due to the valuable guidance it has provided me in my testing career and continue to do so.

I came across these principles during my university studies and the ISTQB Exam from the book “Foundations of Software Testing” by Dorothy Graham, Erik van Veenendaal, Isabel Evans and Rex Black. Looking back on my testing experience, I can now see how these principles provide guidance when testing. I always keep these guidelines in the back of my mind when testing as it helps to carry out the testing in an effective and efficient manner.

I wish I could have known these principles earlier when I first started testing. Hopefully, this blog will help my fellow testers in their path to mastering the art of testing.

So regardless of if you are just starting in your testing career or you are an experienced tester, these principles can be applied for all testing situations.

image
(Graham, Veenendaal, Evans, & Black, 2009)

Principle 1: Testing Shows Presence of Defects

The purpose of testing is to discover bugs in software but no matter how much testing we carry out or if no bugs are discovered, we cannot say that there are no defects in the system. Testing will reduce the probability of any hidden bugs remaining in the software however it is not a proof that the software is bug free.

Principle 2: Exhaustive Testing is Impossible

As a tester, one of the most important concepts to be aware of is that it’s not possible to test everything i.e. testing all the possibilities, although you might be tempted to. When testing, you have to keep in mind that software development projects work on budgets and constraints. Testing all the scenarios will require more resources therefore will require more time and more money. This would lead to going over budget and over time. This in turn will cause project failure.

To combat this, we need to determine where to focus our testing effort based on risks and priorities. Testing should also provide good coverage of the entire project rather than focusing all the testing effort in one specific area. Create a test plan according to the risks, priorities and coverage given the budget and time. This will lead to more effective and higher quality testing.

Principle 3: Early Testing

The earlier the bugs are found, the less the cost to fix them. Bugs found later in the development stage are expensive to fix. The following graph shows the cost of the project compared to the time the bugs are found.

image

Figure 1: The rising costs of finding and fixing defects. (Ambler, 2002)

Therefore, it is best to start testing as early as possible in the software development lifecycle (SDLC). Conduct early test design, requirements and reviews to capture any gaps and fix them prior to starting development work. It is a good idea to involve the test team right from the beginning of the SDLC so they have a good understanding of the product and can create more effective tests.

Principle 4: Defect Clustering

This means that defects are not distributed evenly across an application and tend to concentrate or cluster in a few areas. Thus, a few modules of the application will contain the most number of defects.  We can apply the Pareto Principle,  (the 80-20 rule) which says that 80% of the bugs are in 20% of the code or modules.

This information can be used during risk assessment for test planning to allocate more time for testing areas with known complex code/sections of the application. Testing these complex areas early can help to reduce the time and cost of finding defects.

Also if you come across a defect during testing, it is likely there will be more in that area. The cause of these clusters is because some areas of the code can be complex and tricky or making changes can have a rippling effect in the software and create more defects.

Principle 5: Pesticide Paradox

This principle says that if the same set of test cases are repeated over and over again, it will no longer find any new bugs. This is similar to insects building up resistance to pesticides over time. The reason for this is when bugs are initially found and fixed, the number of bugs will reduce as the software has improved hence the same tests will not find any new bugs as the defect clusters change over time.
To prevent pesticide paradox, testing now needs to focus on other areas or risks such as looking at the requirements and design documents for defects, writing new test cases to test different areas of the system that were not tested previously and writing test cases to test different paths or using different test data.

Writing more test cases and testing them will require more testing time hence increase the cost. Therefore it is important to work according to the priority of test cases. Review and update your test cases depending on changes to the product, new releases and remove any unwanted tests. This will help in managing the testing time.

As the 'hot spots' for bugs get cleared up, we need to move our focus elsewhere, to the next set of risks. Over time, our focus may change from finding coding bugs, to looking at the requirements and design document defects, to looking for process improvements to minimise bugs in the software.

Principle 6: Testing is Context Dependent

Testing needs to be tailored according to the type of project. For example, testing an air traffic control system should be different to testing an online shopping website.
Different software systems have different levels of risk and impact therefore testing needs to reflect this. More focus and more rigorous testing will need to be carried out for an air traffic control system than the online shopping website because it has a much higher risk and impact if defects were found in the software compared with the online website.

In some projects, a spelling error can seem trivial. However for another project this could have a major impact on the reputation of the business. Hence, when presented with a project, you should first recognise the risks and impact of the project in order to determine the different methodologies, techniques and the types of testing to apply. This will help to provide a quality product and manage the testing time and budget.

Principle 7: Absence of Error Fallacy

It may seem that the software has been tested and all the defects have been fixed.. However the system could still end up being unusable by the client. This can occur when the software developed did not meet the business needs and requirements of the user.

The main purpose of software is to assist the user in completing their tasks effectively and efficiently. Hence when conducting testing activities, it is important to keep the user needs and requirements in mind. Test cases should not be developed for the wrong requirements.

It’s important to have reviews and meetings to discuss the requirements with the whole team.

It may seem like these principles are just theory and will not really be used in practice when carrying out testing work. However this is not the case. Keeping these principles in mind will help to plan testing activities and test software diligently in a methodical manner that can save time and money. If the principles seem too daunting at first, you can start applying one principle at a time and slowly work through the rest. Through experience, you will automatically apply these principles in your thought processes when testing.

References

Ambler, S. (2002). Agile Modeling: Effective Practices for eXtreme Programming and the Unified Process. New York: John Wiley & Sons, Inc.

Graham, D., Veenendaal, E. v., Evans, I., & Black, R. (2009). Foundations of Software Testing ISTQB Certification. Hampshire: Cengage Learning EMEA.

Business Required Asterisks on Opposite Sides in Dynamics 365 V9

$
0
0

With Dynamics 365 v9 being available there have been a few noticeable changes to the User Interface as you can see in the screenshot below. One of the more noticeable differences can be seen when comparing the ‘Account Name’ field and the ‘Phone’ field below. Both fields are set as business required, but the business required asterisks are on opposite sides. This can confuse Users into thinking they may have different meanings and overall provides a less than ideal visual.

image

The issue seems to occur when a field, which is not business required by default, is made business required by using client-side logic. The screenshot below shows the text view of a simple Business Rule which sets the Main Phone (Phone) field to be business required if it does not contain data. This caused the asterisk to appear on the opposite side in the screenshot above. The same behavior also occurs when a field is set as business required using JavaScript.

image

A simple workaround at the time of writing this blog would be to set the field as business required by default and use a business rule or JavaScript function to make this required or optional. Doing this causes the asterisks to stay aligned on the same side as shown in the screenshot below.

image

Why Learning to Code Can Make You a Better Tester

$
0
0

As a tester, you most likely have heard that ‘Programming knowledge is not a requirement to be a tester’. That’s true. However, it could make you a better tester. Like me, you may have read articles on the benefits of knowing a programming language for testing. However, I was not fully convinced until I experienced it for myself.

Following are the important concepts I have taken away from my learning and hope that it supports you in in your journey to becoming a better tester.

Empathy

Coding is not an easy task! It takes a great deal of effort to create an application that works after coming across countless numbers of errors and fixing them. After spending much time on the application, you will feel it is a part of you and an extreme sense of accomplishment for the amazing creation you have made. Also, you would probably not see any flaws in the code you have written.

Finding bugs means you are looking for flaws in someone else’s work that they have worked hard to create. So, when reporting bugs you should be thoughtful in communicating the bad news in a way that does not criticize the person but only the product. You should create an environment where there is a mutual understanding between the developer and the tester so that both parties are trying to achieve a common goal of delivering a quality product to a client and that it is not about finding flaws in the person.

Learning a programming language can help you better understand how bugs can develop in code and the difficult task for developers in trying to resolve them.

Log Better Bugs

If you have learnt a bit of coding, you will know the difficulty in trying to fix an error. Therefore, the more information that is available to you regarding the error, the easier it will be to isolate the problem and find a fix. This will minimize the feedback loops and help to get the bug resolved faster. When logging bugs, try to put as much information as possible within the given time frame i.e. the steps taken, the data used and any screenshots. Look for ways that you can isolate the error and note these steps down in the bug report. Isolation refers to all the information gathered in narrowing down the factors that caused the bug.

Improve Communication + Understanding

Knowing a programming language will help you to understand the developers’ language when discussing bug related issues. This will improve the collaboration & communication within the team and you might even be able to make suggestions to resolve the bug!

Understand Coding Error Messages

Before learning to write code, I was afraid of it! I would rather leave it for the developer to figure it out. However, these coding error messages can contain useful information that can help you in your investigation in isolating the bug further. Don’t be afraid of reading coding error messages. It is not necessary to fully understand the text but try to understand what is happening and the error description.

image

Figure 1: Sample Error Message  (Mitchell, 2009)

Write Better Tests

Knowing how coding works can provide you with insight on where and how it can fail thus help you to write more thoughtful tests.

I hope these concepts encourage you to learn some coding skills. You might just enjoy it as much as I did. It will not only help you become a better tester but to also have a more successful career.

References

Mitchell, S. (2009, September 6). Displaying a Custom Error Page (C#). Retrieved from Microsoft: https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-getting-started/deploying-web-site-projects/displaying-a-custom-error-page-cs/_static/image1.png

Chart Subgrid Label Not Being Set in a Dynamics 365 Dashboard

$
0
0

While adding charts to a dashboard, I came across an issue where I couldn’t change the properties of a chart in a dashboard. The reason I couldn’t update the properties was that the Label field was not populated. This is a required field, which is automatically set when we add the chart in the dashboard component, and it could not be changed by the user in the chart properties.

image

Since the required field was now empty, I couldn’t save any changes made to the chart properties, and was prompted an error.

image

Changing the charts back and forth on the dashboard component didn’t solve the issue either. This was happening on Dynamics CRM 2016 version 8.1.1.1005. After some trial and error, I found a solution to this issue. Since it wasn’t happening on all the components of the dashboard and there was one specific component that I had the issue on, all I had to do was remove the affected component from the dashboard and add it back. The cause of this issue in unknown, and it was a custom dashboard that I created. As shown in the screenshot below, I removed the affected component (highlighted in Yellow), while I kept the component without such issues (highlighted in Green). 

image

Then I added the chart component back in. It can be resized based on the requirements.
  image
Then, I selected the same chart that I had issues with earlier, and this time the label was being set automatically.

image

Connecting a Bot Framework Bot to Cortana as a Skill

$
0
0

Microsoft’s Bot Framework allows developers to easily create and deploy bots to many different channels, one of which being a Cortana channel. Once your bot has been developed and is ready to publish, you can make this available for use by Cortana as a ‘Cortana Skill’. You can find more information about Cortana Skills themselves from the Microsoft documentation at https://docs.microsoft.com/en-us/cortana/skills/overview. This blog will give a quick example of how to connect a bot to the Cortana channel.

image

The first thing to check before creating your bot would be if your account is an organizational type or not. Unfortunately, at the time of writing this blog, if your account is an organizational account you won’t be able to connect your bots to Cortana, so you’ll need to use a different account. Fortunately, you’re able to sign up for a trial Azure account at https://azure.microsoft.com/en-us/. For this trial account you’ll need to verify by phone and by card (you’ll need a debit or credit card for verification, but it won’t get charged as this is a free account).

image

Once your account has been sorted out and you’ve developed your bot in Azure, you can navigate to the ‘Channels’ area in your Bot Web App Service and select to add a Cortana channel. To add the Cortana Channel, you’ll need to fill in required information which involves the Display text, Invocation Name, Description and Primary Category. You also have the option to add more details like an icon, a subcategory, a second category, tags, data for Cortana’s notebook to provide the bot and the ability to manage a User’s identity. Once you save this channel that will automatically publish it for your own use with Cortana.

image

On the channel settings there’s also a manage button which takes you to the Cortana Skills site (https://www.knowledge.store). If it’s your first time here, you’ll be given a walkthrough and prompted to create your first organization/botlet. You can skip this and go straight to your workspace which at this point should contain your bot framework bot. From the workspace area you can manage your existing Cortana Skills and even create new ones. By selecting the existing bot we created in Azure and navigating to the Publish tab, we can check the details of the skill and even have the option to publish it to a group or the world.

image

Now that it’s published we’ll need to check a few things before logging into this account with Cortana. Unfortunately, at the time of writing this blog, if you’re outside of the US you’ll run into problems with Cortana connecting to your bot unless you change two settings. First, you’ll need to change Cortana’s Language to be set to English (United States). You can search for ‘Change Cortana Language’ using the windows search and change it from there. Next, you’ll need to change your Windows Settings Region to ‘United States’, which again you can search for and change.

image

Now if I bring up Cortana and use the Invocation Name I set for my bot (which in this case is just ‘Test’) Cortana will attempt to connect to my Bot. The screenshots below somewhat show what the dialog would be like when talking to my bot which is used to contact someone else using either a Facebook message, SMS or an Email. Cortana follows the same dialog that the bot provides to every other channel and displays things like buttons.

image

image


Adding Manual Discounts to Quotes and Orders in Dynamics 365

$
0
0

In the first part of this three-part series I will describe two methods by which a discount can be manually applied to a Quote/Order in Microsoft Dynamics 365.

Orders and Quotes have the following fields that may be used to apply a discount:

•    Discount Percent: Is a manually applied percentage value that discounts the Quote/Order by the specified Percentage.
image

•    Discount Amount: Is a manually applied dollar value that discounts the Quote/Order by the specified Dollar Amount.

image

Any discount applied to the Quote/Order in this manner applies to the Detail Amount which is the total Extended Amount of all the related Quote/Order Products.

It is common practice to apply only either a Discount Percent or a Discount Amount rather than both to a Quote/Order. Microsoft Dynamics 365 does not enforce this. If required, this can be enforced by adding some custom programming to the Quote/Order form or entity.

If both a Discount Percent and a Discount Amount are applied to a Quote/Order the discount is first calculated using the Discount Percent and then calculated using the Discount Amount; i.e. the Total Discount Amount = (Detail Amount – Discount Percent)Discount Amount.

image

In my next blog I will describe three methods by which a discount can be automatically or manually applied to Quote/Order Products.

Automatically Apply Discounts to Quotes And Orders in Dynamics 365

$
0
0

In the second part of this three-part series I will describe three methods by which a discount can be automatically or manually applied to Quote/Order Products.

Quote/Order Products have the following fields that may be used to apply a discount:

  • Manual Discount Amount: Is a manually applied dollar value that discounts the Quote/Order Product by the specified Dollar Amount.

    image
  • Volume Discount Amount: Is a system calculated dollar value that discounts the Quote/Order Product Price Per Unit by the calculated Dollar Amount. The calculated amount is dependent on the configuration of the Price List Item for the selected Price List, Product and Unit and the Quantity on the Quote/Order Product. The Volume Discount is automatically calculated and applied based on predefined Quantity Breaks and a specific Discount Percent or Discount Amount.

The following image shows a Discount List configured to apply a Percentage Discount based on various Quantity breaks:

image

The following image shows a Discount List configured to apply a Dollar Amount Discount based on various Quantity breaks:

image

The following image shows a Price List Item for one of the Products used in the previous example with a Discount List now associated with it:

image

The Volume Discount is automatically calculated and applied to any Quote/Order Product based on the configuration of the Discount List and Price List Item in the Product Catalogue and the selection of the Product, Unit and Quantity on the Quote/Order Product:

image

PRICING METHOD PERCENT or AMOUNT

The final method by which a discount can be applied to a Quote/Order Products is to configure the Price List with related Price List Items where the Pricing Method used is either Percent of List with a configured Percent value that is less than 100% or is Currency Amount with a configured Amount value that less than the normal List Price. Separate Price Lists can be optionally configured and used for selected Customers, Campaigns, Orders/Quotes as desired.

In this example the use a Pricing Method of Currency Amount is used. In addition, a Unit Group of ‘Group x 10’ rather than ‘Person’ is used. This helps to enforce a minimum Quantity for purchase and discount purposes. In this example, the configured Amount for a ‘Group x 10’ is equivalent to 10% of the normal List Price for 10 People.

image

The following image shows the resulting Quote/Order. Notice that the Unit is ‘Group x 10 and the Quantity is 1.

image

This method of discounting the Quote/Order Products does not provide any summary information on the Quote/Order or Quote/Order Product showing how much discount was applied.

My personal preference is to use the previously described Volume Discount method. Multiple Price Lists may be configured and used. These may be Customer, Campaign, and/or Quote/Order specific. However, only one Price List may be applied to a Quote/Order.

In my next blog I will describe two fields for Quotes/Orders that are not normally displayed on the Quote/Order form that provide system calculated totals for the discounts that have been applied to the Quote/Order.

Postscript: The use of Override Pricing on Quote/Order Products might also be considered as a method for applying a discount to a Quote/Order Product by setting the overridden Price Per Unit to be less than the standard system calculated Price Per Unit.

Dynamics 365 Open Lookup in New Window

$
0
0

The default behaviour when a user clicks on a lookup field in Dynamics 365, is that it opens the record in the same window. In some scenarios this behaviour is not ideal since users may want to open related lookup records in another window to view more information to assist in populating fields in the current record or make decisions.

Quick view forms can display fields from the related record, but this would involve customization to the quick view form every time a new field needs to be displayed.

An alternative to this, is by using a Web Resource that opens the related lookup record in a new form behaving like CRM 2011. This simple Web Resource is ideal for scenario’s where the lookup field is re-populated, since the web resource is in a read-only state and only changes if the source lookup control changes value.

image


The following steps demonstrates how to create a HTML Web Resource to achieve this new window popup behavior. Note that this uses unsupported JavaScript:

  1. Obtain the name of the source lookup field which is passed in as a Web Resource custom parameter, e.g. “accountid”.
  2. Setup an on change event against the source lookup field so when a user changes the lookup value the link is re-generated to reference the new lookup record.

    image
  3. Get the value of the lookup field and generate html tags to display the records name and assign an onclick event which executes the openNewForm() function passing the id of the record and logical name.

    image
  4. Execute the new version 9 Client API function Xrm.Navigation.openForm() to open the record in a new window.

    image
  5. Apply CSS styling to the HTML web resource to achieve the same look and feeling as a standard Dynamics 365 lookup controls with an icon to indicate to a user that this is a custom Web Resource control.

    image
  6. Add the new Web Resource control to a form and configure to have a label and custom parameter set as the lookups field name.
  7. Format layout as 1 column and 1 row with scrolling set a never and display border unchecked.

    image

Repeat steps 6. and 7. if you want to apply the window popup behavior against another lookup field. The only changes you would make is the label and custom parameter which would be set to the lookups field name.

So, to conclude this simple Web Resource is a good solution to resolve scenario where users would need to view another related record for more information to assist in populating data or decision making.

How to Export and Import Themes in Dynamics 365

$
0
0

In Dynamics 365, themes are not solution aware. Most of the time we need to recreate the custom theme for each instance. However, there is a way to export the theme from one instance and then import it back to another instance. By doing so, we can save a lot of time when it comes to keeping the same theme across multiple instances. In this blog, I will walk through the steps to export and import Dynamics 365 themes.


First, we need to note down the fields that we want to add in the exported themes, in this case I wanted to add all the fields that are available on the themes form except the Logo field.

image


Then we need to create an Advanced Find query, and add the filter based on our requirements. In the query, I added only those columns that I took a note of above. Then I ran the query which returns the themes that I wanted to export. Once we get the list of themes that we want to export, click on Export Themes followed by Static Worksheet. Then save the worksheet on your machine.

image


Once the worksheet has been downloaded, open it. Even though the column header of Column A says Do Not Modify, we are going to remove the data in cells of Column A. This is done so that new Theme records can be created in Dynamics 365. However, leave these cells populated with the GUID of the themes that you would like to update in target instance. This column is hidden, and you might have to unhide. Following screenshot shows an example.

image


Once the worksheet has been saved, it is ready to be imported into other instances of Dynamics 365.


To import the themes, I clicked on Import Data button in the themes view.

image


Then I imported the theme by uploading the worksheet I modified recently.

image


After the import was successful, I refreshed the All Themes view, and my imported theme was available to be published.

image


Then, I was able to use my custom theme as normal and published it.

image

How to Provide User Access to Update Global Option Sets in Microsoft Dynamics 365

$
0
0

In Microsoft Dynamics 365, it is possible to provide access for Users to add and update the options in a Global Option Set without the need to assign them either the System Administrator or System Customiser Security Roles.

Here’s how. Add these four permissions to an existing or new Security Role assigned to the User or to a Team of which they are a Member.

image

A User, such as a User assigned the standard Sales Person Security Role, might initially have the ability to navigate to the Customisations area on the Site Map in Microsoft Dynamics 365, but they will not be able to go any further than viewing the Developer Resources page.

image

However, once assigned a Security Role with the required permissions they will be able to navigate to Customise the System or Solutions, open a Solution and then select and edit a Global Option Set.

How to Provide User Access to Update Global Option Sets in Microsoft Dynamics 365

This image shows a custom Account Classification Global Option Set in an opened Solution.

The User will be able to add, edit (i.e. rename) and delete (not recommended) the options in the Global Option Set.

image

There is no need for the User to publish their changes. They will be available to all Users as soon as they are saved and/or deployed.

It is important that they are trained not to change the Option Value of an option or to delete options; at least not without rigorous change and deployment controls/processes being in place.

It is recommended that these Users do not use the Default Solution to make changes to Global Option Sets. They should be trained to use a specific Solution created for them by a System Customiser or System Administrator that contains only the Global Option Sets they are permitted to change. The Solution should also be associated with a Publisher with a unique Publisher Prefix other than that used by a Business Partner or any other party. This ensures that the Option Values on any new options added by the User do not conflict with those added to the same Global Option Set by a Business Partner or other party.

Unable to Import Solution Because of Invalid XML

$
0
0

In Dynamics 365, we have the option to modify the charts by changing its XML. I recently created a new custom chart in Dynamics 365, and I had to modify its XML based on my requirements. However, during the solution deployment to another instance, the deployment kept on failing. Following is the message that was being displayed.

image

In the log file, there was a message that says “The 'distinct' attribute is not declared”. It was happening because of the chart which I had customised the XML for. That chart was also a component of the solution that was getting deployed. While modifying the XML of that chart I added the keyword ‘Distinct’. Following are the steps for workaround this issue:

  1. Export the solution with the chart which isn’t using Distinct keyword.
  2. Import the solution in the target instance.
  3. Import the chart with Distinct keyword in both instances. In my case, I imported the charts to and from the same solution that I deployed.

image

After following the steps above, I was able to successfully deploy the solution and the charts in the target instance.

Lookup Filtering using AddCustomFilter vs AddCustomView in Dynamics 365

$
0
0

Lookup Filtering Options and Gotchas in Dynamics 365

When it comes to lookup filters, sometimes the out of the box related Records Filtering doesn’t quite make the cut. You may want to filter by common values on the entity other than lookups or by more than one lookup. This is where you can utilize two functions in field controls to change filters or even the view that your lookup uses. These methods are AddCustomView and AddCustomFilter. What you use is dependent on what you need.

How to Use AddCustomView

If you want to filter by not only your primary record type but also a related record through a link-entity you will need to use AddCustomView. If you will not be using linked filtering, then you can use AddCustomFilter. In this example we are looking for accounts that have open cases and the cases have a primary contact equal to the one we have specified. We could have taken this contactId from another field on our source entity.

The parameters of this method are:
• A guid this must be unique among the ids of the other views on the account entity lookup
• The name of the entity
• The name the view will have
• The view fetchXml
• The view layout, this defines the fields that will appear in the view along with the space that they will be allowed. If you need help constructing this, you can grab it from an existing view in the customizations.xml file when you export a solution.
•    Whether or not this view will be the lookups default view

image

Example Filter:

image
Example Layout:

image

How to Use AddCustomFilter

This will add your filter to the filtering already applied to your default look up view, so if you’re going to use this you should ensure you either know you default filters or have them blank so you don’t get any surprises in your results.

The parameters of this method are:
• Filter criteria this does not contain the whole fetchXML definition. Instead it is only the filtering criteria.
• The entity that the view will look up to.

image
Example Fetch:

image

An interesting and annoying issue that I came across. See the example layoutXml below:

image

I have mistakenly used the wrong id field name as the result when an account is selected. When you select a record while this view is in use, it will appear to be selected but will not submit anything to the database when you save the record. If your lookup is required, you will be told to add a value to the lookup even though it looks like you have on the screen.


Canvas and Model Driven Apps in Microsoft PowerApps

$
0
0

With the PowerApps platform, you can use both canvas and model-driven apps to build applications that can help you solve your business problems around manual tasks, role-specific scenarios and consequently, helping you to infuse digital transformation to your manual and outdated process.

image

If you’re deciding the type of app that would suit your business best, read on the following differences between the Canvas and Model-driven app.

image

List of available connectors for the Canvas App: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections-list

Things to Look out for when using Business Rules in Dynamics 365

$
0
0

Business rule in Dynamics 365 allows us to create simple rules and recommendations to apply logic on the form without the use of JavaScript. However, it can sometimes cause issues for JavaScript logic. For example, based on the requirements, I had to hide the Company Profile section on the Account form if the value of the Account Category was Standard. To achieve this, I used the JavaScript logic to hide the section. However, I used business rule to show/hide the Industry field in Header form which was also available in the Company Profile section.

image

JavaScript logic to show/hide the section was working fine until the business rule was added to show/hide the field in the form header. When the business rule was added, the JavaScript logic no longer was hiding the Company Profile section. However, the business rule was able to show/hide the Industry field in the header and the form. When the business rule was deactivated the JavaScript, logic worked fine.

The workaround this issue is to turn business rule logic into JavaScript logic and deactivating the business rule itself. When the business rule logic shows/hides a field which is also available in the section, the section is visible again regardless of what JavaScript did to its visibility. This happened in Dynamics 365 instance using the version 8.2.0.749.

System Pricing Calculations for Quotes and Orders in Dynamics 365

$
0
0

In this article I will briefly describe the System Pricing Calculations for Quotes/Orders in Microsoft Dynamics 365.

It is possible to disable the System Pricing Calculations for all the pricing fields on Opportunities, Quotes, Orders and Invoices in Dynamics 365. Refer to https://msdn.microsoft.com/en-us/library/dn817885.aspx.

IMPORTANT NOTE: Disabling this option will require you to then provide custom programming to calculate all the previously system calculated pricing fields for Opportunities, Quotes Orders and Invoices.

This customised subgrid and form for a Quote/Order displayed in the following image highlights the fields that are calculated by Microsoft Dynamics 365; i.e.

• On Quote/Order Products: Price Per Unit, Volume Discount, Amount and Extended Amount.
• On Quotes/Orders: Detail Amount, Pre-Freight Amount, Total Amount, Total Line Item Discount Amount, and Total Discount Amount.

image

On Quote/Order Products the Tax is not system calculated.

By default, the Total Line Item Discount Amount and Total Discount Amount are not displayed on the Quote/Order form.

The pricing fields for Quote/Order Products are calculated as follows:

PRICE PER UNIT

When the Pricing option is set to ‘Use Default’, the Price Per Unit is calculated based on the configuration of the Price List Item identified using the Price List on the Quote/Order, the Product and the Unit on the Order/Quote Product. The Pricing Method configured on the Price List Item could be one of the following:

• Currency Amount
• Percent of List (i.e. Percent of List Price)
• Percent Markup (of either Current Cost or Standard Cost)
• Percent Margin (of either Current Cost or Standard Cost)

If one of the Percent Pricing Methods is used, then a Rounding Policy may also be configured to determine whether the calculated Price Per Unit is rounded. There are various options for how the Price Per Unit is rounded.

If using the Percent of List Pricing Method, you will need to add the standard List Price field to the Product form so that the List Price can be configured for Products.

When the Pricing option is set to ‘Override Pricing’, as is the case when adding a Write-In Product to the Quote/Order, the Price Per Unit must be manually entered by the User.

VOLUME DISCOUNT

The Volume Discount is calculated if a Discount List is associated with the Price List Item and the Quantity falls within one of the Quantity Breaks configured in the Discount List.

Discount Lists may be configured to apply the same Discount or different Discounts based on Quantity.

The calculated Discount is a Discount on the Price Per Unit and may be configured as a Percentage or as an Amount. If the Price Per Unit is $1,000 and the Quantity is 10 and the Discount List associated with the Price List Item provides a 10% Discount or a $100 Discount for the specified Quantity, then the Volume Discount will be $100.

AMOUNT

The Amount is (Price Per Unit - Volume Discount) * Quantity; e.g. ($1000 - $100) * 10 = $9,000.

EXTENDED AMOUNT

There are two methods by which the Extended Amount might be calculated depending on the ‘Discount Calculation Method’ setting on the Sales tab in System Settings. By default, this setting is configured as ‘Line Item’ and results in the Extended Amount being calculated as follows:

• (((Price Per Unit - Volume Discount) * Quantity) - Discount Amount) + Tax; e.g. (($1,000 - $100) * 10) - $100) + $1,335 = $10,235. Note: In this example, the pre-Tax amount is $8,990.

image

However, if the ‘Discount Calculation Method’ setting is set to ‘Per Unit’, then the Extended Amount is calculated as follows:

• (((Price Per Unit - Volume Discount) * Quantity) - (Quantity * Discount Amount)) + Tax; e.g. (($1,000 - $100) * 10) - (10 * $100)) + $1,200 = $9,200. Note: In this example, the pre-Tax amount is $8,000.

image

The difference between the ‘Line Item’ calculation and the ‘Per Unit’ calculation is the addition of the Quantity as a multiplier of the Discount Amount.

In both calculations, the Extended Amount is Tax Inclusive. In this example the Tax is 15% of the calculated pre-Tax amount.

The pricing fields for Quotes/Orders are calculated as follows:

DETAIL AMOUNT

The Detail Amount is the sum of the ((Amount - Discount) + Tax) from all the related Quote/Order Products; e.g. $26,700. The Detail Amount is Tax Exclusive, i.e. it is not the sum of the Extended Amount from all the related Quote/Order Products.

PRE-FREIGHT AMOUNT

The Pre-Freight Amount is (Detail Amount - Discount Percent) - Discount Amount; e.g. ($26,700 - 10%) - $2,670 = $21,360.

It is important to know that the Discount Percent is subtracted prior to the Discount Amount. If this were the case the Pre-Freight Amount calculate to a different value; i.e. in this example $21,627 instead of $21,360; a difference of $267.

TOTAL TAX

The Total Tax is the sum of the Tax from all the related Quote/Order Products; e.g. $4,005.

It is important to know that the Total Tax does not take the Discount Percent, Discount Amount, or Freight Amount into consideration. I discuss this issue and provide some replacement calculations in a series of three articles titled ‘Totals and Discounts on Quotes/Order in Dynamics 365’.

TOTAL AMOUNT

The Total Amount is Pre-Freight Amount + Freight Amount + Total Tax; e.g. $21,360 + $0 $4,005 = $25,365.

TOTAL LINE ITEM DISCOUNT AMOUNT

The Total Line Item Discount Amount is the sum of the Manual Discount from all the related Quote/Order Products; e.g. $300.00

TOTAL DISCOUNT AMOUNT

The Total Discount Amount is the sum of the Total Line Item Discount Amount + Discount Percent + Discount Amount; e.g. $2,670 + $2,670 + $300 = $5,640.

Unable to Import Solution Because of SQL Replication

$
0
0

During a recent solution import for Dynamics 365, the import kept on failing even though the solution contained only an updated JavaScript Web Resource. The solution was being imported to a Dynamics 365 on-premise environment with version 8.2.0.749. The error message was:

“An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics 365 Community for solutions or contact your organization's Microsoft Dynamics 365 Administrator. Finally, you can contact Microsoft Support.”

image

Upon doing some research, I figured out that this could be a sign of SQL Replication causing issues for solution import. When the SQL replication was turned off, we were able to successfully import the same solution that we couldn’t earlier. SQL replication was turned back on after the deployment was completed.

Rounding Options for Price List Items in Dynamics 365

$
0
0

Price List Items in Dynamics 365 allow the configuration of pricing for Products using several options. These options are Currency, Discount List, Quantity Selling Option, Pricing Method and Rounding Policy. In this article I will describe the Rounding Policy options for Price List Items in Dynamics 365.

The following image shows the configuration of a Product in Dynamics 365 with the List Price set to $217.39.

image

There are several Pricing Methods for Price List Items. These are Currency Amount, Percent of List (i.e. Percent of List Price), Percent of Markup and Percent of Margin. The Percent of Markup and Percent of Margin can be based on the Cost Price or the Standard Price; two fields which in addition to List Price are not by default displayed on the Product form but can easily be added.

The Rounding options are not applicable to Price List Items when the Pricing Method is set to Currency Amount as shown in the following image:

image

However, as soon as the Pricing Method is set to one of the Percent based Pricing Methods, such as Percent of List, the Rounding options become applicable.

image

When the Rounding Policy on the Price List Item is set to ‘None’, the Price Per Unit on Opportunities, Quotes, Orders and Invoices in Dynamics 365 is not rounded.

image

When the Rounding Policy is set to ‘Up’ and the Rounding Option is set to ‘Ends in’ then the Price Per Unit is rounded up to the nearest amount that ends in the specified Rounding Amount. In this example, the Price Per Unit on an Order Product has been rounded up to the nearest amount ending in $0.00; e.g. from $217.39 to $218.00. If the Rounding Policy was set to ‘Down’ then in this example the Price Per Unit would have been rounded down to $217.00.

image

When the Rounding Policy is set to ‘Up’ and the Rounding Option is set to ‘Multiple of’ then the Price Per Unit is rounded up to the nearest multiple of the specified Rounding Amount. In this example, the Price Per Unit on the Order Product has been rounded up to the nearest multiple of $5.00; e.g. from $217.39 to $220.00. If the Rounding Policy was set to ‘Down’ then in this example the Price Per Unit would have been rounded down to $215.00.

image

When the Rounding Policy is set to ‘To Nearest’ and the Rounding Option is set to ‘Ends in’ then the Price Per Unit is rounded up or rounded down to the nearest amount ending in the specified Rounding Amount. In this example, the Price Per Unit on the Order Product has been rounded down to the nearest amount ending in $0.00; e.g. from $217.39 to $217.00.

image

When the Rounding Policy is set to ‘To Nearest’ and the Rounding Option is set to ‘Multiple of’ then the Price Per Unit is rounded up or rounded down to the nearest multiple of the specified Rounding Amount. In this example, the Price Per Unit on the Order Product has been rounded up to the nearest multiple of $0.10; e.g. from $217.39 to $217.40.

image

The Rounding Policy does not apply to the Volume Discount, Amount or Extended Amount for Products on Opportunities, Quotes, Orders and Invoices as shown in the following image, where the Rounding Policy has been configured to round the Price Per Unit to the nearest $5.00.

image

Viewing all 651 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>