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

Displaying Entity Forms Inside Microsoft Dynamics 365 Portal

$
0
0

Microsoft Dynamics 365 lets you display the entity forms within your Dynamics 365 Portal (previously owned by ADX Portals). It empowers users to store information from the portal form directly into CRM. It’s a user-friendly interface that allows you to collect data from the portal without having to write extensive code.

The entity forms are created in Microsoft Dynamics 365 and can be placed into the portal webpages. The form in Dynamics 365 which is being posted into the Dynamics 365 Portal contains the following section:

image

The following steps will enable you to add your entity form to your portal:
Step 1: Go to Portal -> Entity Forms and create a new Entity Form. Select the Entity Name and then choose the Form and Tab name that you wish to display on the portal.

image

Step 2: Create a new custom Entity Permission and define the scope and privileges for the entity. The permission will be applied to the individual records. Entity Permissions can be created by selecting Portals -> Entity Permissions (per the below screenshot).

image

Step 3: After creating the Entity Permission, a custom web role should be assigned to it. The same role is assigned to the users that you wish to grant portal access. Web roles can be assigned from the Web Role subgrid located on the same Entity Permission form.

Step 4: Place the below code to the source panel of the web template. You can place it inside the div element of the page that you wish to display the entity form. This code checks for the associated Entity Form on the template and displays it on the portal.

image

Step 5: Finally, sign into the portal and click ‘Edit’ on the top right menu (see below screenshot). The dialog box to customize the web page will pop up which will let you select the entity form that you created earlier at step 1.

image

The portal will get refreshed after saving the changes on the dialog box and will render your entity form on it. Most of the entity forms can be successfully rendered on the portal, however, header/footer fields and Iframes are not yet supported.

After configuring, this is what the Dynamics 365 form section looks like in the Dynamics 365 Portal:

image


Create a Service Level Agreement for Cases in Microsoft Dynamics 365

$
0
0

Service Level Agreement (SLA) is one of the many features in Microsoft Dynamics 365 which can be used to manage services provided to clients. It is a level of service of contract between a Company and its Client.

Suppose XYZ help desk needs to create a new service level agreement for a client (Frosty Ltd.) so that high priority cases are responded to and resolved within their specified time frame.

The below is the screenshot for an existing SLA created in Dynamics 365 using ‘System Admin’ security role. It is important to note that not all users are able to create their own SLA’s.

image

To access this, go to Settings > Service Management> Service Level Agreements


The screenshot above shows the different options we can set on an SLA.

SLA Type

There are two types of SLA – Standard and Enhanced.

Standard SLAs apply to the Case entity only. Enhanced SLA Types can be created for all entities including custom entities, that are configured for SLAs.

Note: Once an SLA type is selected and saved, the selected SLA type cannot be changed for any record associated with the SLA.

Applicable From

This field helps us to set when the SLA timer starts.

For Frosty SLA, Created On is the option selected which indicates that SLA timer to begin as soon as the case record is created.

Allow Pause and Resume

This feature is not available for Standard SLA Type.

Using Enhanced SLA’s only we can pause an SLA when the case is on hold, so that the time the case is on hold isn’t considered in SLA timer.

Suppose when a high priority case is picked by the XYZ company customer service agent and is partially resolved, but have few questions to clarify with Frosty Ltd. The customer service agent is waiting on the client to reply, so the case and SLA can be put on hold and doesn’t count in SLA calculations until the client responds, and the SLA can resume.

Business Hours

In this field we can specify the XYZ company opening hours [8 a.m to 5 p.m.] Monday to Friday. Otherwise by default it applies 24 hours, 7 days a week.

For example, if a Case is created on Friday at 4:30PM, the SLA will count for 30 minutes and will exclude the rest of Friday and the weekend. The timer will resume at 8:00AM on Monday morning.


SLA Details

The SLA above is configured so that a customer service agent will see a warning if a first response is not sent within 30mins of Case creation, and a failure if the Case is not resolved within an hour. This only applies to high priority cases as shown in the screenshot below.


  image

• In the Applicable When section, a high priority case is the condition under which the KPI will be applicable. The conditions can be based on primary or related entity fields.
• In the Success Criteria section, specify the conditions to define when the KPI will be considered as met.
• Under SLA Item Failure, the KPI will be considered as failed if the first response is not done within 1 hour of case creation.
• Under SLA Item Warning, specify the time in which a warning should be raised for when the SLA KPI is nearing compliance.

For the SLA to work, you need to Activate it. This can be done by clicking on the “Activate” button on the SLA. You can also set a default SLA using the “Set as Default” button.

Let’s see what the SLA looks like on the Case form.

image

As shown in above screenshot, On the Case record, click on the Tab selector and from the options select Enhanced SLA Details               

image

The Enhanced SLA Details section displays on the case record and the Timer starts ticking as soon as the case is created according the conditions we have given. We can see that the customer agent has 14 seconds left for the first response, and 8 minutes to resolve the Case.


Disable SLAs

If you don’t want to use SLAs system-wide, you can disable SLAs at the organisation level, rather than having to disable each individual SLA. This is done in the Service tab in System Settings, by setting the Disable SLA option to Yes.

image

SLAs are very easy to configure in Dynamics 365 and gives your users a nice visual representation of KPIs they need to meet for various entities.

New Fully Customizable Dialogs in Dynamics 365 with Alert.js 3.0

$
0
0

image

Alert.js version 3.0 is going to be available very soon, and with it comes a bunch of cool new features, most anticipated of all is the new ‘showPrompt’ function which enables you to create fully customizable prompts, similar to what dialog processes provide in Dynamics 365.

Microsoft recently deprecated dialog processes in Dynamics 365 9.0. Historically, dialog processes have been the only real way to create customizable step by step processes to capture input from a user, and use that input to perform some other logic. Task Flows are slowly being rolled out, which gives us some flexibility as developers, but these still have limitations, and they’re currently only available on the unified interface, so not very useful at the moment.

As of version 3.0 for Alert.js, it’s now possible to easily set up some simple input forms using the new ‘showPrompt’ function. This works similar to the standard ‘show’ function, but includes an additional parameter where you can specify an array of fields to capture input of different types, including single line text fields, multi line text fields, numbers, radio buttons, checkboxes, date/date times*, option sets, lookups**, file pickers, and more!

Without giving too much away, here’s a couple of examples of what can be done using the new Alert.js v3.0 showPrompt function.

Recreate Out-of-the-box Functionality

For as long as I can remember, the Dynamics 365 community have been asking how to customize the out-of-the-box popups Microsoft uses throughout the system, including the Close Opportunity, Create Order, and Resolve Case screens. With Alert.js 3.0 we can overwrite these functions to display our own customized screens, while maintaining a familiar look and feel.

image

Nested Alerts

Previously with Alert.js it has not been possible to display 2 alerts at the same time. This made validation difficult, especially when this validation needed to be run on top of an already visible web resource. With Alert.js version 3.0 we can now give each alert a unique ID so that they don’t overwrite any other visible alerts.

This works great when validating input fields from a prompt, to make sure required information is captured before continuing.

image

This is also useful if you need to lock the UI with a loading spinner while an async operation is completed in the background.

image

File, and other HTML 5 Inputs

You can use the ‘file’ input type to allow users to upload files from their computer into Dynamics 365 through a nice user-friendly interface. The file data returned includes all the information about the files, as well as the base64 contents, so you can use this with the Web API to create notes/attachments in Dynamics 365, or upload them directly to SharePoint.

Other supported HTML 5 input types include: text, number, date, datetime-local, radio, and checkbox.

image

There are many more cool new features available in Alert.js 3.0, which is going to be fully released very soon. Contact us for more information about version 3.0 commercial licensing, or if you’re interested in getting early access. Alert.js 2.1 will continue to be available for free on Github (https://github.com/PaulNieuwelaar/alertjs) and on Microsoft App Source (https://appsource.microsoft.com/en-us/product/dynamics-365/magnetism.alertjs). Stay tuned for more updates regarding the version 3.0 launch!


* Date/date time pickers are not available in Internet Explorer. Dates can still be entered manually in IE.
** Lookups are only available in Dynamics 365 v9.0+. Earlier versions will display an error when used.

Dynamics 365 V9 Contact Records Not Opening from All Contacts View

$
0
0

In the Dynamics 365 V9 update there is a new view for Contacts – the “All Contacts” view. However, attempting to open existing contacts from this view only results in the new contact form opening instead.

AllContacts

If we look at the FetchXml for this view we can see that this view is missing the contactid attribute, this is the cause of why only the new contact screen opens.

image

To fix this we want to edit the All Contacts view. To do this we can either go to Settings > Customizations -> Customize the System -> Entities -> Contacts - > Views or click on System Views from within the … menu on the All Contacts view.

image

Then open the All Contacts view.

image

After this we need the click the Add Columns button and then select a column to add to the view, it does not matter which one. Then after it has been added, select the added column and remove it by clicking on the Remove button. Then click Save and Close and then click the Publish all Customisations button.

image

This will resolve the issue as the view editor in Dynamics 365 will automatically add the contacted column to the view when editing it if missing.

Fast-Track Dynamics 365 Development with Visual Studio Snippets

$
0
0

When developing, there are often things that you repeat on a regular basis. In order to speed up development, it can be helpful to have portions of code that are available for quick access.

With Visual Studio, it is possible to put together code snippets with templated variables, which allows for quick creation of essential portion of code. For example, when developing CRM solutions, I very frequently find myself writing Query Expressions that are very similar in format. So I’ve created a template of these to use, which can be activated very simply.

Setting Up

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets
     xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
   <CodeSnippet Format="1.0.0">
     <Header>
       <Title>QueryExpression</Title>
       <Description>Adds basic query expression template</Description>
       <Shortcut>qe</Shortcut>
     </Header>
     <Snippet>
       <Code Language="CSharp">
         <![CDATA[QueryExpression $qe$ = new QueryExpression("$logicalName$") { NoLock = true };

            EntityCollection $coll$ = sdk.RetrieveMultiple($qe$);$end$]]>
       </Code>
       <Declarations>
         <Literal>
           <ID>qe</ID>
           <ToolTip>Replace with the name of the QueryExpression.</ToolTip>
           <Default>qe</Default>
         </Literal>
         <Literal>
           <ID>coll</ID>
           <ToolTip>Replace with the name of the EntityCollection.</ToolTip>
           <Default>coll</Default>
         </Literal>
         <Literal>
           <ID>logicalName</ID>
           <ToolTip>Replace with the logical name of the entity to retrieve.</ToolTip>
           <Default>account</Default>
         </Literal>
       </Declarations>
     </Snippet>
   </CodeSnippet>
</CodeSnippets>



A snippet is very quick and easy to set up. A complete guide can be found here: https://docs.microsoft.com/en-us/visualstudio/ide/walkthrough-creating-a-code-snippet but I’ll provide a quick overview.

  1. Create a new xml file with the name of your snippet. I called mine QueryExpressionSnippet.
  2. Replace the extension with .snippet – this lets Visual Studio know that this is a snippet file and should be treated as one. If you are developing the snippet in VS, this is good as VS will provide intellisense for the available xml options.
  3. Fill in the snippet with the required information. I’ll post my snippet definition below.
  4. Open the Code Snippets Manager (Tools > Code Snippets Manager)
  5. Click Import
  6. Navigate to and open previously created snippet
  7. Choose snippet location – this should be My Code Snippets by default
  8. Use your snippet!

Snippet Definition

In the definition, the attributes of the snippet are set. This includes the Title/name, description and designated shortcut.

Templated variables can be created in the declarations node and then included by surrounding them with ‘$’ characters, as shown above. The variables can then be customized under ‘Declarations’, to specify the ID, Tooltip, and Default. 
Note: $end$ is added to remove the extra line break at the start of the snippet.

Use

Once set up, the snippet is very easy to use. Simply type the specified shortcut – in this case qe – and press the tab key to expand the snippet.

image

image

Once used, the templated variables can be tabbed through and changed just like out of the box Visual Studio code snippets.
  image

Fast-Track Dynamics 365 Part 1 of 2 - Development with Visual Studio Snippets

$
0
0

When developing, there are often things that you repeat on a regular basis. In order to speed up development, it can be helpful to have portions of code that are available for quick access.

With Visual Studio, it is possible to put together code snippets with templated variables, which allows for quick creation of essential portion of code. For example, when developing CRM solutions, I very frequently find myself writing Query Expressions that are very similar in format. So I’ve created a template of these to use, which can be activated very simply.

Setting Up

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets
     xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
   <CodeSnippet Format="1.0.0">
     <Header>
       <Title>QueryExpression</Title>
       <Description>Adds basic query expression template</Description>
       <Shortcut>qe</Shortcut>
     </Header>
     <Snippet>
       <Code Language="CSharp">
         <![CDATA[QueryExpression $qe$ = new QueryExpression("$logicalName$") { NoLock = true };

            EntityCollection $coll$ = sdk.RetrieveMultiple($qe$);$end$]]>
       </Code>
       <Declarations>
         <Literal>
           <ID>qe</ID>
           <ToolTip>Replace with the name of the QueryExpression.</ToolTip>
           <Default>qe</Default>
         </Literal>
         <Literal>
           <ID>coll</ID>
           <ToolTip>Replace with the name of the EntityCollection.</ToolTip>
           <Default>coll</Default>
         </Literal>
         <Literal>
           <ID>logicalName</ID>
           <ToolTip>Replace with the logical name of the entity to retrieve.</ToolTip>
           <Default>account</Default>
         </Literal>
       </Declarations>
     </Snippet>
   </CodeSnippet>
</CodeSnippets>



A snippet is very quick and easy to set up. A complete guide can be found here: https://docs.microsoft.com/en-us/visualstudio/ide/walkthrough-creating-a-code-snippet but I’ll provide a quick overview.

  1. Create a new xml file with the name of your snippet. I called mine QueryExpressionSnippet.
  2. Replace the extension with .snippet – this lets Visual Studio know that this is a snippet file and should be treated as one. If you are developing the snippet in VS, this is good as VS will provide intellisense for the available xml options.
  3. Fill in the snippet with the required information. I’ll post my snippet definition below.
  4. Open the Code Snippets Manager (Tools > Code Snippets Manager)
  5. Click Import
  6. Navigate to and open previously created snippet
  7. Choose snippet location – this should be My Code Snippets by default
  8. Use your snippet!

Snippet Definition

In the definition, the attributes of the snippet are set. This includes the Title/name, description and designated shortcut.

Templated variables can be created in the declarations node and then included by surrounding them with ‘$’ characters, as shown above. The variables can then be customized under ‘Declarations’, to specify the ID, Tooltip, and Default. 
Note: $end$ is added to remove the extra line break at the start of the snippet.

Use

Once set up, the snippet is very easy to use. Simply type the specified shortcut – in this case qe – and press the tab key to expand the snippet.

image

image

Once used, the templated variables can be tabbed through and changed just like out of the box Visual Studio code snippets.
  image

Fast-Track Dynamics 365 Part 2 of 2 - Development with Visual Studio Templates

$
0
0

When developing, there are often things that you repeat on a regular basis. In order to speed up development, it can be helpful to have portions of code that are available for quick access.

In a previous blog, I wrote about how you can use Visual Studio snippets to allow for quick creation of code  that is used on a regular basis.

Another way to accomplish this is through the use of Visual Studio item templates. A template, as opposed to a snippet, can allow you to create the overall structure of your code. A good example of when this is useful is when developing plugins for CRM. Often, plugins in CRM follow a certain structure or process:

•    Obtain IPluginExecutionContext
•    Obtain IOrganizationServiceFactory
•    Obtain IOrganizationService
•    Obtain needed parameters from context
•    Execute plugin logic

If you are following these steps the entire time, it doesn’t make sense to write them out manually each time. This is where templates come in. It’s possible to write the general structure of the file, including using statements and supplementary methods.

Setting up

Templates are quite quick to set up. A complete guide can be found here: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-create-item-templates but I’ll provide a quick overview. For the purposes of this example, I’ll demonstrate how to create a plugin template.

  1. Add an item to your project - C# class file.
  2. Modify the item to create the shell of the template - perform regular logic – anything that is generic and will be reused.
  3. Replace portions of code with templated variables – a guide for this can be found here: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-substitute-parameters-in-a-template. I’ve also provided an example below.
  4. In the Project menu, click Export Template.
  5. Choose Item Template.
  6. Select the item you just created to export – then choose next.
  7. Select the assembly references you want to include in the export – then choose next.
  8. Enter the template name, description, and whether you want to automatically import the created template, then click finish. The files for the template will be copied to the directory specified in the wizard, with the default directory being %USERPROFILE%\Documents\Visual Studio <version>\My Exported Templates.
  9. If you chose to automatically import the template, this will be available for use after restarting Visual Studio. If not, copy the template zip and place it in the item template folder for your user. The default location is %USERPROFILE%\Documents\Visual Studio <version>\Templates\ItemTemplates.
  10. The template is ready for use.

Template Definition

I’ve included the sample code for a plugin template here, which includes initialising the IOrganizationService and ITracingService, and obtaining an entity from the context.

using Microsoft.Xrm.Sdk;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace $rootnamespace$
{
     public class $safeitemname$ : IPlugin
     {
         public void Execute(IServiceProvider serviceProvider)
         {
             IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
             IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
             IOrganizationService service = factory.CreateOrganizationService(null);
             ITracingService tracer = (ITracingService)serviceProvider.GetService(typeof(ITracingService));

            Entity target = context.InputParameters["Target"] as Entity;

            // Logic goes here...
         }
     }
}

Use

Once set up, the template is very easy to use. In a project, select add item, then select the template for use. The template will automatically draw the variables from the creation window, including name and namespace.

The end result is shown below:

clip_image002
  image

Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction Error When Installing Dynamics 365

$
0
0

During a recent install of Dynamics 365 I had this error pop up.

image

This was caused because we had left SQL Server Management Studio while performing other set up tasks. To continue from this error, you need to close SQL Server Management Studio and then click on the Retry button to resume the install.


GrantConfigDBDatabaseAccessAction Error When Installing Dynamics 365

$
0
0

During a recent install of Dynamics 365 I had this error pop up.

image

This was caused because we had left SQL Server Management Studio while performing other set up tasks. To continue from this error, you need to close SQL Server Management Studio and then click on the Retry button to resume the install.

Recreate Personal Views as System Views with Impersonation in Dynamics 365

$
0
0

Views can be created as both system and personal views. The former will be available to all Users who have permission to view the entities and the latter will be available to the owner and anyone who it is has been shared to. This blog will focus on a simple way using a console application to convert all personal views to system views, as there is currently no way to achieve this using out of the box features. This method will make use of impersonation to retrieve the personal views of all Users and will then loop through them to create system view copies. The example used in this blog is one of many ways you could use impersonation in a console application.

image

The method above is what I used in a console application to complete the task outlined. It starts off by retrieving the Ids of all Users in the system, which can be seen in the code below. It then loops through the list of Ids and sets these to the CallerId of the sdk one at a time. In this case I used OrganizationServiceProxy as my sdk variable to connect to CRM, which I did before calling this method.

image

Once the personal views (which have the logical name ‘userquery’) have been retrieved and filtered by Id to remove duplicates, the next step would be to create the system views. For creating the new system views, with the logical name ‘savedquery’, I had pre-created a list of attributes which allowed me to map the relevant data from personal view to system view. This needed to be done as the entities of both views differ in number of attributes.

After running the console application, the views for all Users were recreated as system views. In the environment I used to test this, my User was the only User with a personal view created.

image

The screenshots above and below show the view “My Contact View” being duplicated as a system view.image

The console application can be used to clean-up the unnecessary personal views once they have been converted into system views.

Dynamics 365 Under the Hood - Matching Email Addresses to Records

$
0
0

For those of you tracking emails in the Outlook Client, or using the Email Router or Server-Side Sync to copy emails into your CRM system, you may have wondered how Dynamics 365 matches email recipients to different records. This blog provides an overview of what happens under the hood.

image

The EmailSearchBase Table

The Dynamics 365 database contains a table called EmailSearchBase, which is used to match email addresses to records in your system. This makes it easier and faster for the system to find matching records based on an email address, by looking at a single table, rather than sifting through all Accounts, Contact, Leads, Queues, Users etc, and any custom entities that are enabled to “Send Email”.

The table contains the following information:

EmailAddress

Self-explanatory, it’s just an email address.

ParentObjectId

The unique identifier (GUID) which represents the record in your system that holds the email address.

ParentObjectTypeCode

A number representing the entity for the record in your system that holds the email address. For example, 1 represents Accounts, 2 represents Contacts.

EmailColumnNumber

A number representing the field that was updated. Note that this differs per entity.

How the EmailSearchBase Table is Maintained

The EmailSearchBase table is automatically maintained by the system, when the following actions occur:

•    An email address is entered into an email-enabled field for an email-enabled entity. Examples of email-enabled fields include emailaddress1, emailaddress2, emailaddress3, while email-enabled entities include Account, Contact, Lead, Queue, User. Note that you can create your own email-enabled entities if you like.

•    An email address is cleared from an email-enabled field for an email-enabled entity.

•    An email-enabled record with an email address is deleted.

To understand this better, let’s look at a few examples.

Email Address added to emailaddress1 for an Account

If a user creates a new Account and enters test@test.com for emailaddress1, the following information will be stored in the EmailSearchBase table.

•    EmailAddress: test@test.com

•    ParentObjectId: {57EDE396-A295-4CF7-829B-ABC0F7AB5838}

•    ParentObjectTypeCode: 1

•    EmailColumnNumber: 42

If an email is sent from test@test.com to a CRM user or Queue, the system will look for any records in the EmailSearchBase table where EmailAddress = test@test.com, and will show the Account in the “From” field. The details of the CRM user or Queue will also exist in the EmailSearchBase table, and will be displayed in the “To”, “CC”, or “BCC” fields.

Email Address changed for emailaddress1 for an Account

If emailaddress1 is changed from test@test.com to myemail@test.com, the existing EmailSearchBase row is updated.

Email Address removed from emailaddress1 for an Account

If test@test.com is removed from the emailaddress1 field on an Account, the existing EmailSearchBase row will be deleted.

Delete an Account

If an Account is deleted, all rows in the EmailSearchBase table are deleted, based on the ParentObjectId. Note that there are no changes if the Account is deactivated. This could be problematic if you have Users who leave the company, and their User record is disabled.

To Sum Up

You don’t need to worry about the EmailSearchBase table – it’s managed automatically as mentioned above. What you do need to worry about is ensuring that your email address data is accurate and up to date, so tracked emails truly reflect every recipient involved.

Easily Capture Media from the Dynamics 365 Mobile and Tablet Apps

$
0
0

If you are a salesperson who is out in the field with the Microsoft Dynamics 365 Mobile and Tablet App, you can easily capture video, photos and audio in your Dynamics 365 system using the on-device camera and microphone.

image

This blog explains how you can easily capture video, photos, and audio by creating a Note for specific record types in Dynamics 365.

  1. From the Home page, click on Ellipsis button on the bottom left corner and select Settings.
  2. Tap on Mobile Settings and turn on the “Camera” and “User content and location” and Click OK to save changes.
  3. Once this is done, you can use the Photo, Microphone, Video, or Attachment buttons to add your media files to CRM.

image

image

image

Please note that the storage limit for CRM online is 10GB and the maximum file size for attachments is 128 MB. You may want to consider extracting attachments from CRM and storing them in SharePoint so you don’t exceed the maximum storage limits.

Increase Metadata Field Size in SSIS Toolkit

$
0
0

I have been working on an upgrade from CRM on-premise to CRM online, which requires us to migrate data from the on-premise system into online using the SSIS Toolkit. During the migration, I received the following error:

The input value for 'address1_stateorprovince' field (or one of its related fields) does not fit into the output buffer, please consider increasing the output column's Length property or changing its data type to one that can accommodate more data such as ntext (DT_NTEXT). This change can be done using the component's Advanced Editor window.

As mentioned in a previous blog, each column has a maximum width in the Connection Manager. The import uses metadata retrieved from CRM to validate the data it is about to process. When there is a field that exceeds this limit an error is thrown.

For example, let’s say you have a text field that allows a maximum of 50 characters. Data is entered into this field, and then the maximum length is reduced to 2 characters. When you then migrate the data from on-premise to online, the data no longer fits into the 2-character field.

Fortunately, you can update the metadata data that is held in SSIS to tell it to allow these larger values through. Follow these steps.

  1. Right click on your data source and click “Show Advanced Editor…”.
    image
  2. Go to “Input and Output Properties”, Expand “Output columns”.
    This is the metadata that the data you read from CRM is supposed to match.
    image


  3. Scroll until you find the field that was failing and increase its length in Data Type Properties.
    image

Note that if you update the source step “Read account records” then the metadata will refresh and switch back to its smaller size. You will have to update it again.

Warning and Failure Actions in Dynamics 365 SLAs

$
0
0

In my previous blog,  I discussed how can we create an SLA and activate it for the Case entity in Dynamics 365. This blog expands on the SLA functionality by adding an automated email to notify the customer service manager that an SLA is about to expire and also when expired. This provides visibility for the overall performance of your customer service team to ensure that issues nearing SLA are escalated.

We will use the existing SLA that we created in the previous blog. To make changes, the SLA needs to be deactivated.

Warning Action:

The screenshot below shows how we can add a warning action to an existing SLA to notify a customer service agent and their manager that the SLA is about to expire.

Under the ‘SLA Item Warning’ section:

  1. Click on Add Step and select Send Email.
  2. Click on Set Properties to define the contents of the email.

image

image

The screenshot above shows that the email will be sent from the Owner of the case to himself/herself and also to the customer service manger so that the manager can look into this prior if any complexity.

Failure Action:

We can also add a Failure Action to the same SLA which will notify the customer service agent as well as the customer service agent’s manager that the SLA is expired.

Under the‘SLA Item Failure’ section:

  1. Click on Add Step and select Send Email.
  2. Click on Set Properties to define the contents of the email.

image

image

The screenshot above shows that the case which is expired is sent to the owner of the case as well as the Manager of the customer service agent along with the URL.

Once the changes have been made, the SLA needs to be reactivated and set as default for the warning and failure actions to take effect.

Migrating Personal Dashboards and Charts using Impersonation in Dynamics 365

$
0
0

Personal Charts and Dashboards can be created in Dynamics 365 systems which allow Users to view their data in a format they create. These charts and dashboards are different from system defined versions in that they are only available to the creator/owner and users they decide to share them with. Unlike system charts and dashboards, personal ones cannot be added to a solution, so migrating them from one system to another can be difficult. In this blog I will give an example of migrating my own personal charts and dashboards from one system to another by using a console application.

image

The screenshot above shows the code in the console application which I used for the migration. After retrieving the Guid for my own User in the first retrieve, I could use this to retrieve my personal charts and dashboards by setting the CallerId of the OrganizationProxyService to the retrieved Guid. The logical names for these two entities are “userqueryvisualization” (charts) and “userform” (dashboards).

It is important to note that this example uses impersonation. Although I did not need to use impersonation to retrieve my personal data from Dynamics 365, it gives an idea of how you would migrate personal data of other Users if you needed to. Once I have these records retrieved, I can retrieve the Guid of my own User in the second environment and use this to set the CallerId again. For this example, I connected to two different instances outside of the method shown and created global variables for the OrganizationProxyService named sdkOne and sdkTwo. After this, all that’s needed to be done is to iterate through the list of charts and dashboards and create them in the new environment.

image

The screenshots above and below show a personal chart that was migrated from the first instance to the second instance via the console application developed.

image


Navigation Pages in Xamarin Forms

$
0
0

Creating a Navigation Page

Navigation pages are a simple and the most common way of ‘navigating’ between different pages within Xamarin forms. A navigation page is still a Content Page; it does not take much to allow navigation. Navigation can be used to pass through parameters to different pages.

First off, you simply create a new instance of ‘NavigationPage’ and place the initial content page you want displayed. This is demonstrated below.

image

That is how you simply allow a content page to be able to navigate. To navigate to a new content page, you simply just use the below code snippet where “NextPage_Clicked” is the name of the event handler for a button press and “InitialPage” is the page you want to go to.

image

image

Disabling the Back Button and Navigation Bar

This is a very easy task and can only be done on navigation pages, this is done using the code below.

image

image

Some examples are as follows on my basketball manager application:

image

image

Set Focus to First Field on Form in Dynamics 365

$
0
0

Time was, when creating a record  , the first field on the form was the one that the focus was set to. Now, in Dynamics 365 the focus is set to the first mandatory field on the form . For people that are used to using forms as they have been in CRM, this can be quite the annoyance. Fortunately, it’s possible to (in a supported way) set focus to fields through the Xrm.Page api.

Xrm.Page.getControl(controlName).setFocus();

Further to that, it’s possible to make this method very generic, so no matter what form this is run on, as long as the first control on the form is a field. This can be very handy for users that are used to older systems, or need to enter data quickly.

This is can be very easily incorporated into an ‘On Load’ function. When creating this method, it’s a good idea to run a generic clear notifications function on the other controls on the form. This will prevent an error from being raised by Dynamics 365 informing the user that the required field must be filled.

image

The setFocus() function is a handy function, and can be used to improve user experience when used well. Used in conjunction with effective notifications and error handling, it can help to control and optimise the flow of the application.

How to Enable Hardware Acceleration in Windows 10

$
0
0

For whatever reason you may need to enable hardware acceleration, in my case I needed to run an Android emulator within Visual Studio.

Simply access your BIOS (Settings -> Update and Security -> Recovery. Under the Advanced Startup section press ‘Restart Now’ and your pc will restart.

image
 
The above screen should appear, press Troubleshoot -> Advanced Options -> UEFI Firmware Settings -> Restart.

You will be presented with the BIOS UI, navigate to the Configuration section shown in the below image.

image

Simply check that Virtualization Technology e.g. (‘Intel Virtual Technology’ or ‘AMD-V virtualization’) is enabled. Next go to the final section ‘Exit’ as shown below and press ‘Exit Saving Changes’. 

image
As easy as that, now you have hardware acceleration enabled.

How to Use Special Characters in HTML Web Resources in Dynamics 365

$
0
0

When creating content for web pages there are a bunch of readily available resources in the form of special characters that can easily be used for creating formulae, more interesting text, or scalable graphics.

These characters are included in the font-sets, so are generally safe to use on different browsers.

These can be very helpful when prototyping web pages, as they can stand in for graphics while in the development phase.

Including these characters are simple, in the site markup, use the number code of the special character in the text of the element. This should be in the format: &#<Number_Code>;. This meant that an asterisk which has the number code 10033 should be declared as &#10033; which results in the character:  ✱

Embedded in HTML, the special character is used like this:

image

Which ends up looking like this:

image

Depending on the font-family you have selected for your content, this can result in variations upon the character. These are best discovered and resolved through testing.

Before putting this into production, make sure to test with different browsers to ensure that the font renders correctly!

Using in CRM

These can be used when displaying custom information in CRM. I’ve included a wee example below.

image

Information for this dialog could be retrieved from another record which might store the content of the pages, or something similar. The above example is fairly primitive, but it does demonstrate how these special characters can be used in this setting.

Triggering Scheduled Azure WebJobs via a Dynamics 365 Web Hook

$
0
0

Web Hooks were introduced in Dynamics 365 V9. In the documentation for Web hooks, it is recommended to use them with Azure Functions, but what if you have existing Azure WebJobs? For example, WebJobs that are designed as a scheduled service to run complex rollup calculations on recently updated records. With the new Webhooks, you can trigger this straight away when a new record is created instead of having to wait for the schedule. I will demonstrate how to achieve this below.

First, we want to get the WebJobs Web hook URL and the credentials from the Properties of the WebJob in the Azure portal.

image

Once we have the credentials, we then need to create our authentication header value. To authenticate with the Azure WebJob we are going to use Basic Authentication. For this we first need to have our credentials separated by a colon and then Base64 encode the result. I use the online encoder at https://codebeautify.org/base64-encode to do this.

image

Then to register the CRM Web Hook we go to Register => Register New Web Hook in the Plugin Registration tool.

image

This will open the Web Hook Registration screen. On this screen we want to add the Web Jobs Web Hook URL into the Endpoint URL field, and set the Authentication drop-down to HttpHeader.  This will display a table where we can add the Http Headers we require. We want to click Add Property and set Authentication as the Key value, and then Basic followed by our base64 encoded credentials.

image

After saving, we can then register steps against the Web Hook just like creating steps for a plugin. For this example, I will create a step on Create of contact.

image

Now after creating a contact, we can refresh the Web Jobs page and see that it has successfully triggered the Web Job.

image

Viewing all 651 articles
Browse latest View live


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