Archive

Archive for August, 2018

PowerApps – Getting started

August 12, 2018 7 comments

PowerApp is a service from Microsoft Business Application Platform (BAP) for creating business applications that can run in a browser or on a phone or tablet, and no coding experience is required.

Its a 3 step approach to create an App

  • Connect to a Data Source; It can be your Dynamics 365, Azure SQL/SQL On premise, API, etc…
  • Build the UI forms and add business logic using Workflows (i.e., Microsoft Flow, Azure Functions etc..)
  • Publish the App

PAPP_Intro

In this article, I am going to walk you through the steps to subscribe to Microsoft PowerApps and getting started with your first App.

Steps to connect to PowerApp Studio:

PAPP_SignIn

  • Click ‘Sign up free’ if you don’t have account already
    • Note: You can sign in with your 30 days trail account, if you already have one.
  • Click ‘Sign In’ if you have an account
  • Once you login to the Portal
  • PAPP_1
    • Select ‘Apps’ from the Menu
    • Choose ‘Design Mode’
      • Canvas : This mode allows to create the app by dragging and dropping elements onto a canvas, just as you would design a slide in PowerPoint. This mode is apt if your requirement is to build a custom forms with rich UI.
      • Model-drivenModel-driven app design is a component-focused approach to app development. Example of this mode is creating ‘Apps’ in D365.
  • Click on ‘Create an App’ button

PAPP_1

  • Pick your App style
    • If you are beginner, go with Canvas ‘Tablet Layout’

PAPP_2

PowerApp IDE’s:

There are 2 ways to build the Apps

  • PowerApp Studio – Web : In this option, you can build and Publish the App from the browser.
  • PowerApp Studio – Desktop App: You can also download the PowerApp desktop application from Here

In the next article, lets see how to create a simple Calculator App.

🙂

 

Categories: PowerApps Tags: , ,

CRM 2011 (on-premise) – Querying Filtered views from CRM DB

We recently working on Data migration from CRM 2011 on-premise to Dynamics 365.

We got the CRM 2011 SQL DB back up, which we restored in our SQL server. But when we run query on ‘Filtered’ views we were getting 0 results.

FilteredView_1

Reason:

  • FilteredViews always run on CRM User context
  • The account I logged in to SQL server is not a CRM User/Service Account and hence Filteredview returning 0 results

Fix:

  • Before you querying ‘Filtered’ view, set the Context to CRM User using GUID
  • Below is the syntax:

— Set the Context

DECLARE @userid uniqueidentifier;
SET @userid = convert(uniqueidentifier, ‘123A81A3-89C3-E411-B6EF-441EA155CAB5’);
SET CONTEXT_INFO @userid;

–Execute the query
Select top 10 name,statecode,statecodename from FilteredAccount (nolock)

  • GUID used in above query is the valid CRM user’s GUID.
  • Now we should get the Accounts based on the Privilege and Access level of the User GUID we set the context with.

FilteredView_2

Dynamics 365 – Different types of User Accounts and License consumption

Other day I was asked a question “What are the options to create/migrate users in Dynamics 365 application with no license consumption”

The options are

  • Create a User of type ‘Stub User’ which does not consume license
  • Sync a User from O365 to Dynamics 365 and remove the license later. This approach deactivates the User in D365 and free up the license.
  • Create an Application User
  • Create an Administrative User account
  • Create a Non-Interactive User account

To know different options is crucial, especially, when you are migrating the Users from legacy systems and the Users are not expected to access the D365 application which should not cost any licenses.

In this article, I am going explain the different type of Users and how they consume the licenses.

Administrative User Account:

  • An Administrative user is a user, who has access to the Settings and Administration features but has no access to any of the customer engagement functionality.
  • Since the administrative user does not have access to customer data and any of the customer engagement functionalities, it does not require a Dynamics 365 (online) license.
  • To create an ‘Administrative User’
    • Create a User in Office 365; (Admin Center -> Users -> Active users -> Add a user)
  • User2
    • Assign a Dynamics 365 license under ‘Product licenses’ tab.
  • User3
    • Go to D365 application and open the User record
    • On the User form, under ‘Administration’ tab, ‘Client Access License (CAL) Information’ section and select “Administrative” for Access Mode.
  • User1
    • Final step is, remove the Dynamics 365 license of the User from Office 365, so that you can free the license and still the User can login to the application as ‘Administrative’

Non-interactive User Account:

  • Non-interactive user is not a physical User and It is used for programmatic access  to push or pull the data to/from Dynamics 365 applications.
  • Non-interactive user let applications (i.e., Consoles, SSIS packages or ERP connector etc.) authenticate and access Dynamics 365 (online), without requiring a Dynamics 365 (online) license.
  • Creation of Non-interactive user account is same as Administrative User Account, except setting the Access Mode to ‘Non-interactive’
  • There is a limit of five non-interactive user accounts

Application User Account:

  • ‘Application User’ is used while establishing server-to-server (S2S) authentication
  • ‘Application User’ with conjunction of Azure Active Directory (Azure AD) will establish S2S authentication.
  • ‘Application User’ does not consume license.
  • Application users are created with a non-interactive user account, however they are not counted towards the 5 non-interactive user accounts limit.

Stub User:

  • Stub user cannot log in, cannot be enabled, and cannot be synchronized to Office 365 and will not consume license.
  • Stub Users are designed for records that have been imported that refer to this user but the user does not exist in Dynamics 365 (online).
  • Stub users are user records that are created in Dynamics 365 using Data Import or using the Create or Create Requests methods of the SDK.

Licensed User:

  • Licensed user is an User whom gets created in O365 with license and synced to D365.
  • Licensed users must be assigned at least one Dynamics 365 security role to access Dynamics 365 (online).
  • The service does not allow access to users who do not have at least one security role.
  • Removing all security roles from the user prevents the user from signing into and accessing Dynamics 365 (online). However, it doesn’t remove the license from the user.

Refer article for more details.

Notes:

Following are points to consider before Importing Users

  • Imported Users will be in Disabled state in CRM. You have to run a follow up logic to enable Users or you can Bulk Enable users.
  • Users’s Business Unit cannot be set during the import. Users will be assigned to the root business unit.
  • ‘Salesperson’ will be the default role for all imported users. Import will fail if ‘Salesperson’ role is either deleted or renamed.

🙂

 

Dynamics 365 – How to get App URL

Using PowerApps, we can create custom business apps comprised of components such as entities, dashboards, forms, views, charts, and business processes.

Its convenient way to package and provide the components which are matter to the Users.

Lets take a scenario to understand this better

  • A sales company has users having ‘Sales Persons’ and ‘Sales Managers’ roles
  • Sales Persons are intend to access only Accounts & Contacts
  • All I need to do is create an App with those entities and grant App access to ‘Sales Person’ security role. Refer my previous article.
  • Share the ‘App’ URL to the Sales Persons

Below are the steps to get the ‘App’ URL:

  • Open the Dynamics Application
  • Navigate to Settings -> My Apps -> Published Apps -> {Your App} -> Click on and then click ‘Manage Roles’

App URL

  • Expand “App URL Suffix” tab
  • Click on ‘Copy’ icon to copy the URL

App URL-2

  • Share the URL to users and when they access,  they will directly taken to the ‘App’

App URL-3

What is App URL Suffix

  • The app URL is automatically populated based on the App name that you specify.
    • In my example, my ‘App’ name is ‘HelloWorld’ and hence ‘App URL Suffix’ is set to ‘HelloWorld’
  • The app URL must be unique.
  • Below are the URL syntax

🙂

Categories: Dynamics 365 Tags: ,

D365 – Unified Interface – Create an App and Grant App access to a Security Role

August 2, 2018 1 comment

In this article, I am going to provide steps to create new App and how to grant the App access to a particular Security Role.

Prerequisite to create App:

User must have the following privileges to create App:

  • Create, Read, and Write privileges for the “App” entity
  • Read and Write privileges for the “Customizations” entity
  • Read privileges for the “Solution” entity

Steps to create App:

  • From your Dynamics Application, go to Settings -> My Apps -> Create new App
  • You will be redirected to “Create a New App” window
  • In this example, I am going to use “Existing Solution” to add the App (Note: If any site map is available for the selected solution, the Select Sitemap drop-down list will appear when you clicked ‘Next’.)
  • Select the “Client” (Web/Unified Interface)
    • Web: This is the classic Dynamics 365 web browser client.
    • Unified Interface: This is the newer responsive web browser client that has a similar interface across PC and mobile devices.

App1

  • Click ‘Next’ to select the ‘Solution’
    • Note: ‘Next’ button will be available only if you select ‘Use existing solution to create the App’

App2

  • Click ‘Done’

Add components to the ‘App”:

  • Next is add the components (i.e., Entities, Dashboard, etc..) to ‘App’
  • In this example, I am adding ‘Account’, ‘Contact’ entities to the Sitemap

App3

  • Once you add all components, click on ‘Save’ and then ‘Publish’

Publish The ‘App’:

  • Once you create the App, next step is to ‘Publish’ so that it will be available for the respective users.
  • Go to Settings -> My Apps -> Apps Being Edited
  • Pick your App and click on and then click ‘Publish’

App4

  • Post ‘Publish’, App will be available under ‘Published Apps’ section

Grant App access to a Security Role:

Lets grant the access to Users who has ‘Sales Person’ security role.

  • Select your App from Settings -> My Apps -> Published Apps
  • Click on and then click ‘Manage Roles’

App5

  • Under the ‘Roles’ section, pick the ‘Security Role’ which you would like to grant App access to.

App6

Troubleshooting steps If App is not accessible:

  • Once you grant App access to a security role and if the App is not accessible, make sure the ‘Security Role’ has ‘Read’ privilege on ‘App‘ entity

App7

Package/Delete an app:

  • ‘App’ can be added as Solution component and can be moved between Dynamics applications
  • To delete the ‘App’, navigate to Solution -> Components ->Apps, select the App and click ‘Delete’

App8

🙂