Notes on Dynamics 365 for Phones and Tablets app – Part 10 (Data Download Filter in Mobile Offline)


Check the other articles of this series

In the previous posts, we saw how to configure Mobile Offline Profile and how it works for the end-users in the device.

The number of records that can be downloaded for Mobile Offline for a particular entity (and its related entity) can be specified using the Data Download Filter of Mobile Offline Profile Item record.

The total data available offline to the user will depend on Entity (enabled for offline) + Organization Data Filter applied to it + Mobile Offline Profile + Security roles of that user

Navigate to Settings à Mobile Offline à Mobile Offline Profiles

Let us open the Contact Mobile Offline Profile Item that we had specified earlier.

The different options for Data download filter are

  1. All records

Here All records will apply no filtering and all the contact records will be downloaded offline for the configured user.

The one important point to remember is that à

The total entity records (contact in this case) downloaded will be governed by the Organization Data download filter for that entity, what we specify in the mobile offline profile (i.e. data download filter) will be applying further filtering to it.

For contact, the criteria specified is Status equal
to Active.

Organization Data Filter criteria would be modified on less than 10 days for most of the entities by default


So, for All Records, we will have all the active contact records downloaded offline.

On publishing the above mobile offline profile, for users in offline mode, all the active contacts will be available.

And no inactive contacts will be available as shown below.

  1. Other data filter

Through Other data filter, we can specify what records to be downloaded based on ownership.

Here we have just selected Download my records, which should result in only the active (coming from organization download data filter) contacts owned by the user to be downloaded.

Let us publish it.

After successful Publish, let us check the same in the Phone App.

The app shows only the active contact records owned by the user.

Active Contacts view for the same user in Web Application.

  1. Custom data filter

The custom data filter will allow us to define the filter using the Define Profile Item Entity Filter dialog box.

Clicking on Define Filter Rule opens the dialog box for us, wherein we can select the fields of the entity for defining the filter criteria and can group it. We cannot choose related entity fields there.

Here for testing, we have kept the criteria as role equals as the Decision-maker.

Now let us publish the change, and check the data for the user in the mobile app offline.

We just have just one record having a role as the Decision-maker.

Back in the mobile app, the user can see only that one record inside the app.

  1. Download related data only

This option allows us to download related entity data. E.g. with the above contact records, we want to download the related lead records only, for this we will create a new profile item for the lead entity.

Now back in the Contact profile, add an associated offline profile item and specify the Entity-relationship between contact and lead.

Let us publish this new profile.

The user can now select the contact record and can see the related lead record

What happens if we delete the Lead Mobile Offline Profile and only keep the Contact offline profile having the lead association to it?

We’d get the below error

What happens if we keep the contact and lead profile and delete the lead association in the contact offline profile?

This will allows us to publish the profile.

So, for contact we have

  • Org filter as active contacts.
  • Data download filter as – Custom Data filter as Role equals Decision maker.

And for lead we have

  • Org filter as active leads.
  • Data download filter as – Download related data only.

The result – only one contact record with a role as the decision maker will be available for the user.

No associated lead

And no leads

Let us add back the mobile offline profile item association record of the lead in the contact offline profile.

The result à only one active contact record having the role as a decision-maker, and only one associated lead record will be available for the user.

Thus we saw, how we can use Data Download Filter to define filtering, which would specify the total records that would be available to users offline, in the mobile app.

Hope it helps..

Using Xrm.Device pickFile to attach file to notes in Dynamics 365 for Phones and Tablet app


Check the other articles of this series

In the previous post we covered the captureImagemethod of Xrm.Device for taking picture and attaching it to notes.

In this post, we’d look into the pickFile method of Xrm.Device

pickFile works for both Web Client and Mobile Client unlike captureImage which is only works for Mobile Client (Dynamics 365 for Phone and Tablet app)

pickFile method of Xrm.Device allows us to select files from the computer (web client) (through FileDialog box) and images (gallery) in the case of mobile clients. (the exception being Windows Tablet App), which then can be attached to notes.

Here we have added a custom ribbon button named “Pick file and attach” on the Lead entity form.

In the case of Web Client, the File dialog box opens

In the case of Windows Tablet App also, the file dialog box opens.

For Phone App for Android (and iOS), users can select the existing image from the gallery.

On successful attachment of file/image to notes, the user is presented with the below message.

Users can refresh the timeline to see the attached file.

The sample code using the pickFile method


function PickFile(entityId) {

entityId = entityId.replace(/[{}]/g,'');
Xrm.Device.pickFile().then(

function (data) {

// attach the uploaded file as attachment to note
var entity = {};
entity.subject = "Sample Subject";
entity.documentbody = data[0].fileContent;
entity.filename = data[0].fileName;
entity.mimetype = data[0].mimeType;
entity.notetext = "Sample Text";

// lead entity sample
entity["objectid_lead@odata.bind"] = "/leads(" + entityId + ")";

Xrm.WebApi.online.createRecord("annotation", entity).then(
function success(result) {
var newEntityId = result.id;

var alertStrings = { confirmButtonLabel: "OK", text: "File successfully attached to note. Please refersh the timeline." };
var alertOptions = { height: 200, width: 300 };
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions);

},
function (error) {
Xrm.Utility.alertDialog("Error occured while attaching file to notes. Please try again");
}
);

},
function (error) {
Xrm.Utility.alertDialog("Error occured while picking file. Please try again");
}
);
}

Add the Crm Parameter to pass the GUID of the record to the method.

Thus, using pickFile makes it easy for the end-user to capture and attach the file to notes through a click of a button.

Also check out the wonderful tool Notes Metadata Manager , which provides additional capabilities like adding metadata to the attachments, organise attachments using folder structure, drag and drop attachments, upload multiple attachments etc.

Hope it helps..

Using Xrm.Device captureImage to take picture using camera and attach it to notes in Dynamics 365 for Phones and Tablet App


Check the other articles of this series

captureImage method of Xrm.Device allows us to take the picture through the camera and work with that captured image in the code (in this post, we are saving the image in the notes as an attachment).

This method is only available for mobile apps.

Here we have added a custom ribbon button on the Lead entity form.

  • Capture and attach

The capture Image method will allow the user to capture an image using the device camera and attach it to the notes as shown below.

Clicking on “Capture and attach” ribbon button, opens the camera for the user to take the pic as shown below.

Clicking on OK will ask the user to choose the image editor.

Users can edit the image and click on done.

The dialog informs the user that images have been attached.

Users can refresh the timeline to see the attached image in notes.

If we try using the captureImage method inside the Dynamics 365’s web application, we get the below error, because it is only supported for mobile devices.

The method will throw the below error in case of Web Application

“Operation {0} is not supported by platform”

The sample code for captureImage


function CaptureImage(entityId) {

entityId = entityId.replace(/[{}]/g,'');

var imageOptions = {};
imageOptions.allowEdit = true;

Xrm.Device.captureImage(imageOptions).then(
function (data) {

// attach the captured image as attachment to note
var entity = {};
entity.subject = "Sample Subject";
entity.documentbody = data.fileContent;
entity.filename = data.fileName;
entity.mimetype = data.mimeType;
entity.notetext = "Sample Text";

// lead entity sample
entity["objectid_lead@odata.bind"] = "/leads(" + entityId + ")";

Xrm.WebApi.online.createRecord("annotation", entity).then(
function success(result) {
var newEntityId = result.id;

var alertStrings = { confirmButtonLabel: "OK", text: "Image successfully attached to note. Please refersh the timeline" };
var alertOptions = { height: 200, width: 300 };
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions);

},
function (error) {

Xrm.Utility.alertDialog("Error occured while attaching image to notes. Please try again");
}
);

},
function (error) {
Xrm.Utility.alertDialog("Error occured while capturing image. Please try again");
}
);
}

Add Crm Parameter to pass the GUID of the record to the method

CaptureImage

Thus, using captureImage makes it easy for the end-user to capture and attach the image to notes through a click of a button.

To update an entity’s image, we can click on the image itself which will open up the dialog to either use the camera, upload image from the gallery, or revert it to the default image (in not default).

Also check out the wonderful tool Notes Metadata Manager , which provides additional capabilities like adding metadata to the attachments, organise attachments using folder structure, drag and drop attachments, upload multiple attachments etc.

Hope it helps..

Your solution is too large. Reduce the number of entities to 5 or less message while publishing through Ribbon Workbench


To begin with, Ribbon Workbench is easily one of the best tools out there for CRM professionals for almost a decade now.

In CRM 4.0, to add a custom button on the form, we simply had to add a tag in ISV.Config file.

https://nishantrana.me/2009/03/20/adding-custom-menu-and-button-to-custom-entity-through-isvconfig/

The first time I tried adding a button in CRM 2011 (while it was in beta), it took nearly 8 hours.

https://nishantrana.me/2010/11/04/adding-my-first-custom-button-in-crm-2011/

With Ribbon Workbench, it has all come down to a matter of minutes. Thanks to Scott Durow

While working with the tool recently, we were getting the following message repeatedly while trying to publish the changes

The first thing we need to make sure is we are only having the required entity and solution components in the solution that we are working with inside the tool as suggested.

https://ribbonworkbench.uservoice.com/knowledgebase/articles/169819-speed-up-publishing-of-solutions

If we are already following that, another thing that we can make sure is, before we start working with the already loaded solution, is to reload the solution before making any changes.

E.g. I had the solution already loaded in the tool, and now I after a couple of hours I am trying to update a few things in it.

Before making any change, click on the Open Solution and load the solution again.

Load the solution, make any desired change, and publish.

This way we were able to avoid the error during publishing (also it will make sure we are working with the latest solution)

Hope it helps..

An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail while trying to connect using XrmToolBox


While trying to create a new connection in XrmToolBox, we got the below error

We had used the Connection Wizard as the connection method

After failing a couple of more times, we realised the mistake.

For the user who is trying to log in, MFA is enabled.

So, instead we opted for the SDK Login control connection method.

Clicking Open Sdk Login Control button opens up the standard login control to connect to Dynamics 365.

Provide username, password, and click on login.

Enter the code (received on registered phone number).

Thus, using the SDK Login Control, we were able to connect successfully.

You can also connect by registering the Azure AD App

https://alphabold.com/connecting-to-mfa-enabled-microsoft-dynamics-365-using-xrmtoolbox/

Check the below article for further details and different ways to connect to Dynamics 365 using XrmToolBox

https://www.xrmtoolbox.com/documentation/for-users/connecting-to-an-organization/

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 9 (Mobile Offline)


Check the other articles of this series

Continuing our previous post, where we configured the entity for the offline, mobile offline profile, and also enabled the offline option for the app, in this post we’d see the behavior of the apps in the offline mode within the Dynamics 365 for Phones App.

On opening the app, the user for which the mobile offline profile is configured will be presented with the below option to download the data for offline.

Clicking on Download will start the download process.

Navigate to Settings à Offline Status (this status will only be added for the apps enabled for offline)

The Offline Status will show us the status of the download.

Once the download completes, we can see the Contact entity available and also the option of working offline enabled for it.

Enabling Work in offline mode, and navigating the dashboard displays the message as below

The phone app also shows the green connection symbol next to the contact entity.


Navigating to the Account entity (which is not configured for offline) shows the below message.


Navigating to Contact entity (configured for offline) displays the lists as expected.

Now let us open one of the records and update the value of a field in it.

Here we have updated the mobile phone number field.

Let us navigate to the Offline Status option and disable Work in Offline Mode.

We see the “The connection was successfully restored” message.

And also the record updated back in our Dynamics 365 Sales Hub App.

In this post, we saw the basic behavior of the phone app in the offline mode, in the next post, we will explore a few more features of the mobile app with regards to offline mode.

Hope it helps..

Fixed – “You don’t have any apps in this view” error in Dynamics 365 for Phones and Tablets


Check the other articles of this series

For one of the users, who had all the appropriate privileges and security roles to access the Sales Hub app, we were getting the below error.

In iPad à

In Dynamics 365 for Phone for Android à

As part of troubleshooting, we assigned the System Administrator role to the user, tried uninstalling and reinstalling the app, tried in a new device with the same user, but we were getting the same error.

Here we were entering the email account to login to the application.

Later when we tried the “Sign in with a web
address
instead” it worked for us.

It started showing the Sales Hub for the user.

It could be some intermittent issue or something to do with cache, cannot say for sure, would suggest trying out the same, if the user has all the appropriate rights on the entity and the app and is still facing this issue.

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 8 (Mobile Offline)


Check the other articles of this series

Continuing our previous post, here we’d cover the configuration steps and details around offline support for Dynamics 365 for Phones app.

To begin with,

The mobile offline is only available and is supported for iOS (>= 13.1904) and Android (> =4.3.19043) devices.

To enable an entity for offline, we need to check the Enable for Mobile offline option for it.

Below are some of the main entities for which we can enable the mobile offline option (along with newer entities added in the product and the custom entities)

Account Activity Pointer Appointment Attachment Case
Competitor Competitor Address Connection Connection Role Contact
Email Lead Opportunity Opportunity Product Phone Call
Position Product Task Team User

How much data is synchronized?

This is governed by
the Organization data download filter.


Select the entity enabled for Mobile offline and click on the link, and specify the filter

Next, we need to specify the Mobile Offline Profiles, navigate to Settings à Mobile Offline

Below are 2 profiles already available.

The sample sales scenario profile :

Let us create a new mobile offline profile, with add only the contact entity in it.

In the new mobile profile item record, we have selected Contact as the entity.

For Data Downloaded Filter we have 4 options as shown below

  • All records
  • Custom data filter
  • Other data filter
  • Download related data only

All records will download all the data without any filtering, for the user specified.

The ENTITY ORG FILTER will open the filter that was defined for the contact entity earlier.

Let us now add the users for the mobile offline profile.

Now let us Publish the profile.

Next, navigate to Settings – Advanced Settings – My Apps and open the model-driven app in the app designer.

In the properties tab, check Enable Offline profile and select the profile created for contact.

Now we are done with our basic setup.

In the next post, we’d see how all these configuration settings affect the end-user in the offline mode through Dynamics 365 for Phones App.

Hope it helps..

Accessing fields on QuickView Form (Control) through JavaScript in Dynamics 365


Suppose we have below Account’s Quick View Control on contact entity.

Now to access the email address attribute we can use the below Jscript on the Contact’s form onload event.

The result à email address field is hidden in the quick view form.

https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-ui-quickforms/isloaded

Hope it helps..

Book summary: PowerApps Portals Authentication


I recently read the kindle version of the book PowerApps Portal Authentication by Debajit Dutta and Chandana Kommuri.

The book covers in detail the different authentication methods available for the PowerApps Portals and also provides detailed instructions to set them up.

The different topics included in the book are

  • Local authentication – Self Registrations and Invitations.
  • External Authentication – with Google, Facebook, LinkedIn, Azure Active Directory (B2C and B2B)

This is the first and the only book in the market on PowerApps Portals, and I think it would be very helpful for the Dynamics 365 professionals, as authentication is the basic and most important piece of information needed while configuring PowerApps Portals for the customers.

What I like about the books in general is it gives us all the required information at the same place, instead of being scattered all around out there in the web, and also that information coming from the expert(s) who have been working on it (because of which you’d be buying the book in the first place) adds to its credibility. The book not only covers all the required details (how and why) for setting up the authentication but also presents it simply and concisely. The chapters start with how to register the portals with the external authentication provider, the authentication mechanism available, settings required in portals, etc. There is a specific pattern or consistency about the way chapters are written in the book, which will make it very easy to be referenced when required. Being around 150 pages, the book was also a quick read.

Grab your copy at the link below !

https://www.amazon.in/PowerApps-Portal-Authentication-Debajit-Dutta-ebook/dp/B085X2HL4W

Dynamics 365 keeps opening the sign in page in the new tab


We all have faced this issue where Dynamics 365 keeps opening the login page in the new tab.


If we check the URL it is basically redirecting to

Below URL à

To disable this behaviour for all the users, disable the learning path.

Set Enable Learning Path as No.

For individual user, select Opt Out of Learning Path from Personal Options.

https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/admins-customizers-dynamics-365/mt826648(v=crm.8)?redirectedfrom=MSDN

For Internet Explorer (without changing above settings)

http://ronaldlemmen.blogspot.com/2017/02/unlimited-redirects-or-popups-to.html

Hope it helps..

Solved – window onload undefined error in Dynamics 365


Recently we got the below issue raised by the user on form load of one of the entities.


Most of the times this issue will arise because of the control / attribute being referenced in the JavaScript, being not available on the form.

And same was the case here, one of the JavaScript’s associated with the ribbon button, was referring to business process field (header_process_xxxxx) which was not available on the form.

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 7 (Custom Controls)


Check the other articles of this series

Continuing the previous post on the Dynamics 365 mobile app, here we will cover the custom controls.

Custom controls were added to the product in version 9.0 and were part of the new Unified Interface, for us to use at that time. Now we all can create custom control using PowerApps Component Framework (earlier known as Custom Control Framework).

Check out the PCF Gallery for all the custom controls developed by the community.

https://pcf.gallery/

In this post let us look at out of the box custom controls available in the product and how it renders within the Dynamics 365 for Phone App.

Let us start with the custom control for the list.

For the opportunity entity, we have defined below custom control. The Editable Grid option is disabled for Phone.

The tablet app shows the Editable grid as default with the option of switching the view.

For the Phone App, it seems Kanban’s view has some issues. We can switch to all other views configured except the editable which is not available for the phone app.



Below is the table that lists the out of the box custom control, along with its properties and how they are rendered in the phone app, for quick reference.

Field Type Control Property
Whole Number
&
Money
Arc Knob

Radial Knob
Number Input
Linear Gauge
Linear Slider
Whole Number Star Rating (max 5)
URL Website Preview
Multimedia
Boolean Flip Switch
Single line of text Input mask
Auto complete
Multiline of text Pen
Option set Option set (max 3)

Hope it helps..

Error – You have exceeded the maximum number of 2000 characters in this field while using Pen Control in Dynamics 365


We might get the below error while using the pen control.


Just make sure that we have set the field to the minimum length recommended by Microsoft i.e. 15000.


The maximum value that can be set for the text area (multiple line of text) field is 1048576.



Earlier pen control was not available for the Web client.

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/284081/can-t-check-pen-control-for-web-on-dynamics-crm-365/1036343#1036343

But now they can be enabled for the web as well.



Hope it helps..


Notes on Dynamics 365 for Phones and Tablets app – Part 6 (Form customization)


Check the other articles of this series

Continuing the previous post,

in this post, we’d see how we can configure the forms for mobile apps.

Here, for example, we have taken the Contact entity, which would have below main forms for the contact entity.

The same would be available for the user (with appropriate security roles) within the tablet app and phone app.

Now for Sections within in Form, we see the option “Available on phone”, let us keep it as unchecked.

The section would appear within the Tablet app.

The section will not be available for the Phone App users as the name of the option “Available on Phone” suggests.

“Available for phone” option is available for the Tabs as well.

This will hide the tab in the Phone App, but it will be available within the Tablet app.

Also, Microsoft document mentions that Duplicate Detection doesn’t work on phones and only works for tablets https://docs.microsoft.com/en-us/dynamics365/mobile-app/set-up-dynamics-365-for-phones-and-dynamics-365-for-tablets#other-differences-with- which doesn’t seem to be the case now.

The Duplicate dialog box works in case of both tablet and phone app. Below is the screen shot of the phone app.

Also, the documentation mentions that Activity Feeds are not available in Tablets but it seems that it now works for both tablet and phone apps.

With a Model-driven app, it seems most of the things are now consistent across the web, mobile and tablet app, with few exceptions, making it easy for both the admin and the end-users to configure and use.

Hope it helps..

Identify deleted entity and attributes in Audit Summary View – Dynamics 365


We recently had an issue where all the data for certain entities got deleted, which is only possible if that entity has been deleted, which could have been triggered by the deletion of the managed solution.

As it was on-premise, we started our analysis with the wonderful Solution History plugin of XrmToolBox.

The Solution History had the information of new managed solution being imported.

But it didn’t capture the delete event for the solution or the entities.

The good thing was that we had the audit enabled, which helped us to figure out the entities deleted and account that was responsible for this delete (accidental).

For online, it is straightforward to track the solution import and delete event, now with the Solution History available in the product itself.

Another thing to remember with regards to the deletion of the managed solution is,

If Solution A has entity A and entity B and this has been imported as managed in Production first, followed by Solution B that has entity A only.

If Solution B is deleted only Entity A will be deleted as entity B is still being referenced by Solution A.

Check the below blog post to understand the installation order and solution layering.

https://nishantrana.me/2018/11/11/installation-order-for-solutions-patches-in-dynamics-365-customer-engagement/

https://debajmecrm.com/2019/05/23/unearthing-solution-layering-feature-of-dynamics-365-how-are-the-good-old-concepts-of-patching-and-cloning-related-to-it/

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 5 (Dashboards)


Check the other articles of this series

Continuing the previous post,

In this post let us try configuring the Dashboard for mobile.

We have created a custom dashboard having the test entity and have kept the “Enable for mobile” option as unchecked

Now let us add this dashboard in our model-driven app and update the sitemap.

Publish the changes and open the app in the mobile app.

The Dashboard is available within the app, even though the option “Enable for mobile” was unchecked.

Here we need to make sure the user has the Dashboard is accessible for the security roles(s).

Some of the system dashboards will have “Enable for mobile” property already checked and greyed out.

As we already saw, this property doesn’t have any effect in the case of the model-driven app, so to make these dashboards available for the end-user, we just need to add them to the App.

The dashboard within the mobile app.

Now let us try adding an Interactive Dashboard to the app.

The Interactive Dashboard shows up within the tablet app for windows, with a horizontal scroll bar.

And the same inside the phone app for android, displayed vertically considering the screen size.

Now let us check the behavior with the personal dashboard.

Say e.g. user1 (system admin) has created the following personal dashboard named personal dashboard.

The same is displayed for the user within the mobile app.

As expected, it is not available to another user, considering it is a personal dashboard.

Let us share the dashboard and check.

The personal dashboard will be available to the user to who it has been shared.

It seems like with earlier version it was not possible

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/208534/crm-dashboard—viewing-shared-dashboard-on-mobile

Thus, we covered how to add the dashboards to the app and the way they render within the mobile app.

We have also shared our feedback on some of our findings on Microsoft docs

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 4 (Entity Configuration)


Check the other articles of this series

Continuing the previous post,

Now let us see how do we enable a specific entity for mobile.

To begin with, let us first create a custom entity named Test. For now, let us leave the Enable for mobile option unchecked.

[Update – Enable for mobile has been renamed to Enable for Unified client]

EnableForMobile

We have created a new model-driven app and added that entity in the sitemap.

Let us publish the changes and try accessing the app from Dynamics 365 mobile app.

Even without checking “Enable for mobile” option, the Entity is available as it is part of Model-Driven App and we are accessing it using System Administrator that has rights on both the app as well the custom entity.

Now let us check that option along with read-only option on the custom entity and publish the changes

This setting makes the entity as read-only for the user (even System Administrator)

Now let us update the site map, add the same entity inside sub-area, also create a new group and new area and add the same entity.

Let us save and publish the changes and see how it gets rendered inside the mobile app.

Below how it displays the navigation, exactly as specified in the Sitemap, inside Dynamics 365 for the Tablet app and Phone app.

Microsoft Documentations says

https://docs.microsoft.com/en-us/dynamics365/mobile-app/set-up-dynamics-365-for-phones-and-dynamics-365-for-tablets#navigation-bar

which it seems it doesn’t apply with the Model-Driven app anymore.

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 3 (supported iPad devices)


Check the other articles of this series

Continuing our previous post on attachments, here we will cover the list of iPad devices supported.

Here first have the look at the list of supported versions and RAM (minimum) for different platforms.

And if we are using the web browser in Tablets to access Dynamics 365 application below are the supported devices. Here the versions are the same as for the apps, but the main point to consider is the resolution and the screen size.

Using the web browser on phone to access a model-driven app is not supported.

Based on the above details, below is the list of iPad devices supported and their specifications that could help in choosing the correct device.

Device Screen size (inch) Release Date iOS
(release with – supported)
Status
iPad mini 2 7.9 November 12, 2013 iOS 7 – iOS 12 Discontinued and unsupported
iPad mini 3 7.9 October 22, 2014 iOS 8 – iOS 12 Discontinued and unsupported
iPad mini 4 7.9 September 9, 2015 iOS 9 – latest Discontinued and supported
iPad mini 5 7.9 March 18, 2019 iOS 12 – latest Current
iPad Air 9.7 November 1, 2013 iOS 7 – iOS 12 Discontinued and unsupported
iPad Air 2nd Gen 9.7 October 22, 2014 iOS 8 – latest Discontinued and supported
iPad Air 3rd Gen 10.5 March 18, 2019 iOS 12 – latest Current
iPad 5th Gen 9.7 March 24, 2017 iOS 10 – latest Discontinued and supported
iPad 6th Gen 9.7 March 27, 2018 iOS 11 – latest Discontinued and supported
iPad 7th Gen 10.2 September 25, 2019 iPadOS 13 – latest Current
iPad Pro 9.7 inch 9.7 March 31, 2016 iOS 9 – latest Discontinued and supported
iPad Pro 10.5 inch 10.5 June 13, 2017 iOS 13 – latest Discontinued and supported
iPad Pro 11 inch 1st Gen 11 October 30, 2018 iOS 12 – latest Discontinued and supported
iPad Pro 12.9 inch 1st Gen 12.9 November 11, 2015 iOS 9 – latest Discontinued and supported
iPad Pro 12.9 inch 2nd Gen 12.9 June 13, 2017 iOS 10 – latest Discontinued and supported
iPad Pro 12.9 inch 3rd Gen 12.9 October 30, 2018 iPadOS 13 – latest Discontinued and supported
iPad Pro 12.9 inch
4th Gen
12.9 March 25, 2020 iPadOS 13 – latest Current

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 2 (Attachments)


Check the other articles of this series

Continuing the previous post

https://nishantrana.me/2020/04/06/notes-on-dynamics-365-for-phones-and-tablets-app-part-1/

here we will look at the attachments.

As we are aware, the file size limit for attachments in Notes is governed through System Settings à Email Tab.

The default value is 5120 KB

And maximum it can be set to 131,072 KB

If the attachment size increases, we’d get the below error message from the web application

And from the phone app

Now as we know that with Dynamics 365 for Phone and Tablet app for Andriod and iOS, we are limited to attaching images i.e. capturing it through camera or selecting an existing image from the gallery.

https://nishantrana.me/2020/03/30/attachments-to-notes-in-dynamics-365-for-phone-and-tablet-app/

For phone and tablets, we can make use of a specific mobile setting, which allows us to set the resolution of the images

Below are our findings on the file size for different resolution for the below devices.

Phone App (KB) Tablet App (KB)
Resolution Samsung S10 Plus iPhone 11 Pro Max Huawei Mate 20 Pro
iPad 6th generation (iOS 13)
Device Default 25 1656 583 619
640 * 480 25 24 17 28
1024 * 768 52 69 36 56
1600 * 1200 92 152 77 154
2048 * 1536 137 196 163 260
2592 * 1936 208 366 303 389

 

Hope it helps..

Notes on Dynamics 365 for Phones and Tablets app – Part 1


Check the other articles of this series

For one of our requirements we have started exploring Dynamics 365 for Phones and Tablets, so just noting down a few of the key points identified during the exploration

  • Supported devices for the app

  • We can use the Web browser on Tablet for accessing Dynamics 365 Model-driven apps with the following specifications.

  • Using the Web browser on phones to access a model-driven app is not supported.
  • Apps on the Older version of iOS and Android other than recommended above are not supported.
  • Dynamics 365 for Blackberry App and Windows Phone App is deprecated and no longer supported.

Required privileges à

Dynamics 365 for mobile is the required security privilege to access Dynamics 365 for phones and tablets.

Following out of the box roles have this privilege assigned to it. (using Privileges Discovery plugin of XrmToolBox)

Let us now assign the salesperson security role to one of the test users and try accessing Dynamics 365 from the phone app (Android).

We’d presented with the below screen.

Let us go to Settings à My App and assign the Salesperson role to the Sales Hub app.

To access Dynamics from App, the additional privileges required are as follows

Security Roles à Customization Tab

And Read on

Business Management – Read access to User Settings

With all the appropriate privileges in place for the user, we can now login with that user’s account and can see the Sales Hub app (or the app configured) available to the user.

In case you do not see the app, try accessing through the web address.

This completes the initial setup; in the next part, we’d cover the rest of the findings.

Check other posts on Dynamics 365 for Phone and Tablet

Hope it helps..

You don’t have any apps in this view or We can’t find any app for your role error in Dynamics 365 for Phones and Tablets app


For one of our users, we were getting below error when he was trying to access Dynamics 365 through phone and tablet app.

To resolve it make sure that all the required privileges are assigned to the user’s security role.

https://docs.microsoft.com/en-us/dynamics365/mobile-app/set-up-dynamics-365-for-phones-and-dynamics-365-for-tablets#required-privileges

and also the role is added to the appropriate app.

Settings à My Apps

Select the security role and click on Save.

We can see the app appearing for the user.

Hope it helps..

Upload files using SharePoint Integration for Dynamics 365 for Phones and Tablets app


Check the other articles of this series

Recently I wrote a blog post that mentions a few points that we can consider while designing a solution with regards to attachments in Dynamics 365 for Phone / Tablet App.

Attachment to Notes à

https://nishantrana.me/2020/03/30/attachments-to-notes-in-dynamics-365-for-phone-and-tablet-app/

Using SetWordTemplate to combine multiple attachments as a single doc à

https://nishantrana.me/2020/04/01/calling-setwordtemplate-from-custom-ribbon-button-in-dynamics-365/

Using the above approach, we can get the doc file attached to the notes.

However, if we try to open the file, we would get the below error message.

To get working with attachments seamlessly from the Mobile / Tablet device, we can make use of out of the box SharePoint integration feature of the product.

https://docs.microsoft.com/en-us/power-platform/admin/set-up-dynamics-365-online-to-use-sharepoint-online

It will allow the user to upload any files from the local file system.

Full access to the local file system

While trying to open the word document it will open the appropriate apps installed

Hope it helps..

Calling SetWordTemplate from custom ribbon button in Dynamics 365


Check the other articles of this series

Let us continue our previous post and this time instead of calling SetWordTemplate action / request from a workflow, we will call it using a custom ribbon button.

If we try calling the action directly using Xrm.WebApi.online.execute
method from a custom ribbon button, we will get the below error “Resource not found for the segment ‘SetWordTempalte’

Source Code: –


function CallAction()
{

var parameters = {};

var selectedTemplate = {};
selectedTemplate["@odata.type"] = "Microsoft.Dynamics.CRM.documenttemplate";
selectedTemplate["documenttemplateid@odata.bind"] = "/documenttemplates(4853247F-AD72-EA11-A811-000D3A31EEC)";

var target = {};
target["@odata.type"] = "Microsoft.Dynamics.CRM.lead";
target["leadid@odata.bind"] = "/leads(2fa01d2d-7332-e611-80e5-5065f38b31c1)";

parameters.SelectedTemplate = selectedTemplate;
parameters.Target = target;
var setWordTemplateRequest = {
SelectedTemplate: parameters.SelectedTemplate,
Target: parameters.Target,

getMetadata: function() {
return {
boundParameter: null,
parameterTypes: {
"SelectedTemplate": {
"typeName": "mscrm.documenttemplate",
"structuralProperty": 5
},
"Target": {
"typeName": "mscrm.lead",
"structuralProperty": 5
}
},
operationType: 0,
operationName: "WinOpportunity"
};
}
};

Xrm.WebApi.online.execute(setWordTemplateRequest).then(
function success(result) {
if (result.ok) {

Xrm.Utility.alertDialog("Success");
}
},
function(error) {
Xrm.Utility.alertDialog(error.message);
}
);

}

As a workaround, we can define a custom action and add the Perform Action step with SetWordTemplate step to it.

Source Code: –


function CallSetWordTemplateAction(primaryControl) {

var formContext = primaryControl;
var leadid = formContext.data.entity.getId(); 

var target = {};
target.entityType = "lead";
target.id = leadid; 

var req = {};
req.entity = target;
req.getMetadata = function () {
return {
boundParameter: "entity",
parameterTypes: {
"entity": {
typeName: "mscrm.lead",
structuralProperty: 5
}
},
operationType: 0,
operationName: "pcfpre_CreateDocumentAction"
};
};

Xrm.WebApi.online.execute(req).then(
function (data) {
var e = data; 

},
function (error) { 

var errMsg = error.message;
}
);
}

Another option is to use the Process.js library

The Ribbon Button

Ribbon button definition

Dynamics 365 for Phone \ Tablet

 

Source Code: –


function createWordDocument(primaryControl) {

var formContext = primaryControl;

var leadid = formContext.data.entity.getId();

Process.callAction("SetWordTemplate",
[
{
key: "Target",
type: Process.Type.EntityReference,
value: new Process.EntityReference("lead", leadid)
},
{
key: "SelectedTemplate",
type: Process.Type.EntityReference,
value: new Process.EntityReference("documenttemplate", "{4853247F-AD72-EA11-A811-000D3A31EEC8}")
}
],

function()
{
alert('Document created');
},

function (error, trace)
{

alert(error);
}
);
}

It internally makes the Soap call to SetWordTemplate Request.

Although we are able to attach the doc to notes, from mobile if we try to open it we will get the below error message

Pic2

To get the document upload to work seamlessly either we need to use Windows 10 based tablets or we need to use out of the box SharePoint integration.

Hope it helps..

Using SetWordTemplate action to automate document generation and attaching it to note in Dynamics 365


Continuing our previous post,

https://nishantrana.me/2020/03/31/using-word-template-to-combine-multiple-images-attached-to-notes-in-a-single-document-in-dynamics-365/

wherein we used word template to generate a document having all the note’s attachments (picture) to it.

To enhance it further, we can write a custom workflow that calls the SetWordTemplate in Perform Action step.

SetWordTemplate action will generate the document, based on the word template defined, and will attach the document to the note of that particular record.

For this

  • Create a process of type workflow.

  • Select step Perform Action

  • Specify the Document Template and the associated entity (e.g. lead) for its input properties.

*if you do not see the entity listed, enable BPF on it

*also make sure you have notes enabled for the entity.

  • Activate the workflow.

  • Run the workflow Generate Word
    Template.

  • After refreshing the timeline, we can see the new note record created with the document as attachment to it.

The generated document à

Now as we do not have option of running On Demand Workflow from Dynamics 365 Mobile / Tablet app.

It seems like April 2020 Release Wave 1 has added this feature to the mobile app

OnDemandWorkflow

So here instead of on demand workflow, we can have a custom workflow to run on change of a specific field.

For e.g. we can add a custom field named when it is updated to Yes, we perform the same action

The workflow

This way we will be able to perform the same function within Dynamics 365 Mobile and Tablet App

Hope it helps..

Using Word Template to combine multiple images attached to notes in a single document in Dynamics 365


Recently in one of our projects, we had proposed Dynamics 365 for Phone / Tablet as the device for our sales user. The user will be capturing the image of the customer’s document and will be attaching it in notes, which will then later be moved to the document management system.

Here, one of the requirements was to merge / combine all the images that are attached to the notes for a particular record into a single document.

Here we can make use of Word Template to achieve the same.

Open the entity’s (e.g. lead) record for which we want to create the word template.

  • Click on Download Template to design the word template.

  • Select Note as the related entity.

  • In the word document, go to Developer Tab and click on XML Mapping Pane ribbon button.

  • Insert a table and select its row.

  • Select the appropriate XML part from the drop down and navigate to Lead_Annotation child node in the XML Mapping section.

  • And map it to the row selected as shown below.

  • This is how the table would appear

  • Next add the documentbody à Insert Content Control à Picture to one of its columns to display the images.

  • This is how it would appear
  • We can also add additional fields of notes if needed.

  • Save the template.
  • Go to Settings à Template and upload the template.

  • To test it, let us go open the lead record which has 3 different notes with image attached as shown below.

  • Now let us generate the document based on the template uploaded.

  • The document will show all the images attached to the notes.

  • We can increase the size of the picture and remove the border from the table to make it appear better.

From Mobile –

This slideshow requires JavaScript.

Get more detail on attachments here à

https://nishantrana.me/2020/03/30/attachments-to-notes-in-dynamics-365-for-phone-and-tablet-app/

Generate PDFà

https://nishantrana.me/2020/02/13/save-and-email-pdf-options-added-to-dynamics-365-sales-2020-release-wave-1-plan/

Hope it helps..

Attachments to Notes in Dynamics 365 for phone and tablet app


Check the other articles of this series

In one of our recent projects we were analysing the Dynamics 365 for phone and tablet app, for one of the requirements where the user will be uploading the documents through phone or tablet app as an attachment to notes.

Below were some of our findings à

  • For mobile app à

We are limited to attaching images on both iOS and Android. (Windows Phone are no longer supported)

  • For the tablet app à

For iOS and Android, it is the same case where we are limited to attaching images.

iPad à

Samsung Tab S4 à

For windows tablet, here Surface Go for e.g., user can still access files in the local storage.

Earlier users had the same experience for the Android tablets.

https://crmtipoftheday.com/259/upload-files-from-dropbox-or-google-drive-to-crm/

Also, iPad allowed attaching files from the web storage like iCloud, OneDrive etc.

https://crmtipoftheday.com/925/tip-925-mobile-attachments-revisited/

which has changed with in the newer version.

Hope it helps..

PCF Control for Email Validation using Email Validator API


The control uses the Email Validator API that checks for fake DNS and regex functions to check email for length and accepted characters.

To use the API, Login to RapidAPI and get the API Key.

Use this key for the API property required by the PCF Control to call the API.

The control will check pass on the email address and based on the response received i.e. isValid true or false, will display the appropriate message just below the field.

The Email Validator API needs to be updated as at times it will show valid domains as invalid. So will not suggest to use this in the production environment.

This control is more of an example of how we can call the APIs, get the response and show the result.

Get the source code here

https://github.com/nishantranacrm/PCFEmailValidatorControl

Hope it helps..