The model-driven apps are a new way to create PowerApps taking advantage of CDS 2.0. If you haven’t created one of them before then here is a quick walkthrough to show you how they work and also how you can create your first Model Driven PowerApp.

How to do it…

Start off by opening up PowerApps and selecting a CDS 2.0 environment.

After you have done that you will notice that if you expand the Choose a design mode tab at the bottom left of the page and you will see that there are two design options. The traditional Canvas mode and also the new Model-driven mode.

All we need to do here is select the Model-driven design mode.


The Home page will then switch over to the Model-driven design mode, and we can create a new app just by clicking on the + New app button.


This will open up the Create a New App page where we can start defining our app details.


We will start off by giving our new app a Name.

For this example, we just set the Name to AccountsApp.

After you have done that, just click on the Done button.


This will take us to the App designer screen where we can start building our app from the models in CDS.

The first thing that we will want to do is update the Site Map which will allow us to include models into the app. We can see that we need to make a change here because of the warning that some configurations are missing.

To do this just click on the Arrow to the right of the Site Map block.


This will open up the Site Map view.

We will now want to give our app a better name by clicking on the New Area tile.


This will open up the We will now want to give our app a better name Area Properties panel.


Here we can change the Title to something a little more applicable to the app.

In this case, we will set the Title to Accounts.


Now we will want to add a Subarea to the app and include the models that we want to have surfaced within the app.

To do this, we just click on the New Subarea tile within the Groups area of the designer.

This will open up the Sub-Area properties panel.


Now we will select the type of area that we want to display by clicking on the Type dropdown list.

We will want to use one of the models within CDS here so we will want to select the Entity option.


Now we will see that some of the fields have been disabled, but there is an option to select the Entity to assign to the sub-area.


Now we can click on the Sub-area dropdown list and select the entity that we want to display in the app.

For this example, we will select the Account entity.


Now that we have done that we can just click on the Save And Close button to finish the setup of the sub-area.


That will take us back to the main designer, and we can click on the Save And Close there as well to save the design.


After we have done that the Validate and Publish options will become enabled and we can finish the process of publishing the app.

To do this, just click on the Publish button.



When we return back to the PowerApps Home page, we will see that there is a new App there for us to use.


If we hover over the app, then we will see that we can run or edit the app.

Right now we want to see it in action so we will click on the Play icon.


That will open up our new app, and we will see that we can access all of the Accounts in this one view.


If we drill into an account, then we will be able to see all of the data is available to us.


Review

How easy was that?

Advertisements

The Cross-Company Sharing feature has been in Dynamics 365 for a couple of versions now, and it allows us to create sets of tables that we can mark to be replicated between two or more legal entities within the system.

This is great because, for a lot of the codes and controls, they will be the same for the most part between all of the different legal entities. There are only so many ways that you can set up discount codes.

I thought that I would take it for a test drive today and created a new blank legal entity and thought that I would add some additional sharing policies to see how this works.

How to do it…

For this example, we have created a new Legal Entity within Dynamics 365 (USPS) that we want to configure. The problem is that a lot of the codes are not populated – for example, the Cash discounts.


I could set all of the discounts up the hard way by copying them by hand from another Legal Entity, or I could use the Cross Company Data Sharing to do it all for me. Because all of the discount codes that I want are sitting in the USMF legal entity already.


To do this, all we need to do is to open up the Cross Company Data Sharing maintenance form. Here we can see that I have already imported a number of new templates into the system, but the Cash discounts are missing.

All I need to do is click on the + New button to create a new record.


Then we will want to give our sharing template a Name. Here we set it to Cash discount.


When we click on the Save button, we will see that the + Add link becomes enabled.


When we click on the + Add link, a search box will appear that will allow us to find the tables that we want to include in this template.


If we search through the Tables, we will be able to find the different tables to share between the organizations. In this case, we want to find the CASHDISC table and select it.


Then we can add it to the sharing project by clicking on the Add table button.


That will add the Cash discount entity to the sharing project.


If we expand the Cash discounts entity, we can see all of the fields that we can sync. We don’t have to share all of the data if we don’t want to. But for now, we will keep all of the fields.


Now we will want to tell the system what companies we will share the data among. To do that we will want to click on the + Add button in the companies panel to create a new record.


We will start off by selecting the USMF company from the company dropdown list.


And then we will want to add another company. So we will click on the + Add button again to create a new company record.


Now we will choose the new company that we created that is blank (USPS) from the dropdown list.


After we have done that our cross-company sharing project is done. All we need to do now is click on the Enable button in the menu bar.


This will open up a dialog that will ask us if we want to copy all of the data between the companies. We want to so we will just click on the Yes button.


That will kick off the initial process to synchronize the data between the two companies.


And after a few seconds, we will return back to the Cross-company data sharing configuration page.


To see what this has done, we just open up the Cash discounts maintenance form within the USPS company that we wanted to populate and click on the refresh button.


Now we will see that all of the Cash discount codes have been copied from the USMF company over to the USPS company.


Summary

If we set up all of the different codes and controls that we want to populate in our new companies, then almost all of the tedious setup will be done for us through the cross-company sharing.

How cool is that.

I am reviving an old project that started a while ago and has started up a new project blog to track the progress. Being a lifelong fan of Dungeons & Dragons, with the unfortunate problem that I cannot find anyone to play with I have decided to create a test implementation Dynamics AX in the AD&D format just to see how it would work and if I can find some creative ways to use Dynamics AX and chose to implement the Waterdeep Trading Company as an example where I can track their many legal (and not so legal) entities within Faerûn.

In this project, we will walk through a simpler setup of Dynamics 365 for Finance and Operations, using the sample demo database that is delivered with the demo systems so that you can quickly create your own Waterdeep Trading Company legal entity and even tweak it so that it is more in the spirit of adventuring in the Dungeons & Dragons theme.

All of the content for this will be available through the Dynamics Companions website as Premium Member Content only and will include the walkthrough and the PowerPoint companions that you will be able to download in their original formats.

Here is a snippet of the first step in the guides.


Read More

In this example we will show a number of different ways that we can manage integration using standard tools. We will start off with a generic SQL database, use LogicApps to send changes to a Service Bus, then use Microsoft Flow to send the data first to the Common Data Service and then to Dynamics 365 for Sales, and finally use the standard integration to update Dynamics 365 for Finance & Operations.


SQL to Service Bus via Logic Apps

How it works…

We will start off with a simple database that is deployed in Azure to simulate a legacy system. In this case we deployed an Azure SQL database and loaded it with the Northwind sample data.


We then created a Service Bus within Azure that we will use to send all of our update messages through.


Using Azure LogicApps we can create an integration monitor that checks the Customers table within the Azure SQL database for new records and then sends a message to the Azure Service Bus when changes are detected.


Whenever a change is made then a message is triggered and a message is sent to the Service Bus.


Service Bus to Common Data Service via Microsoft Flow

How it works…

Now that the message has been sent to the Message Bus, we can trigger events to collect the changes in the Common Data Service using a simple Flow.


When a message is received in the Azure Service Bus the Flow will create a new record within the Common Data Service Accounts Entity.


Here is the new record that was created because of the flow being triggered.


Common Data Service to Dynamics 365 Sales via Microsoft Flow

How it works…

Now that the record is being created within the Common Data Service we can start disseminating it to the core systems. We will use Microsoft Flow again to send the new Account to Dynamics 365 Sales.


Once the flow is triggered we will see that there is now an Account record within Dynamics 365 for Sales.


Dynamics 365 Sales to Finance & Ops via PowerApps

How it works…

The final step to is to synchronize the data within Sales with the Finance & Operations Customers. To do this we will use the Business Platform Admin Centers Data Integration service which maps the data between the two entities.


The Data Integration project will periodically run and create the new Customer records based off the Accounts within Sales.


Within Finance & Operations the Data Management workspace tracks all of the Data Integration Calls.


We are able to see all of the activity and the inserts into the system.


We can even see all of the data that is staged by the integration service.


Now the Customer record is available within Finance & Operations.


Review

How cool is that?

With Platform Update 14 a new feature was added that allows us to add in PowerApps directly into the forms. In addition, this was demonstrated in this presentation: https://www.youtube.com/watch?v=x3qyA1bH-NY

If you want to create the demo then here is how you do it.

How to do it…

Start off by opening up the PowerApps site and then click on the Apps link on the left hand side menu.


When the Apps page is displayed click on the Import package (preview) button link in the header.


This will open up the Import package page where we can start importing in the zip file. To do this, click on the Upload button.


This will open up the file browser where we will want to navigate to the folder where we have the PackageTracker zip file and then click on the Open button.


After we have done that, the process of importing in the project package will start running.


After the package has been processed we will be able to see all of the package information that will be imported in. Notice here that there is only a PowerApp and no data that will be loaded in.

Now we just need to click on the Import button.


After a minute, the project will be loaded and we will get a notification of the successful import. To see the app in action, just click on the Open app link that is in the Next steps… area of the page.


When the app loads we will be able to see the shell of the PowerApp.


Now we will want to link this app into Dynamics 365 for Finance and Operations. To do this we will need to find the application id that will point to the PowerApp. To do this, look in the URL and copy the app id which is the last part of the URL.


Now we will want to switch over to Dynamics 365 for Finance & Operations and click on the PowerApps icon within the menu bar and select the Insert a PowerApp button.


This will open up the Insert a PowerApp form where we can start defining the app details.


Start off by giving the PowerApp a Name.


Then paste in the app ID that we copied from the PowerApp into the App ID field.


Next we will want to specify the reference field that we will pass through into the PowerApp which will contain the tracking number that we will looking up. For our example we are storing the tracking number in the Customer reference field.


Then we will want to change the Application size to Thin since this is a phone style app which is taller than wider.

After we have done that we can just click on the Insert button.


When we return to the form we will get a message to say that the page needs to be refreshed. So just press F5 and refresh the form.


Finally we will want to add the tracking reference to the sales order header.

Valid tracking numbers for the app are:

1Z48263893 (Shipped)

8F28103A73 (out for delivery)


How it works…

To see the PowerApp in action, all we need to do is click on the PowerApps icon in the heading and then click on the Package Tracker
link.


This will open up the Package Tracker PowerApp and show the status of the shipment.


Review

How cool is that!

One of the new features of the Common Data Service is to use Power Query to create custom entities that are linked back to external data. This data could reside in a number of different places, including OData queries.

The good thing is that Dynamics 365 for Finance & Operations allows us to surface all of the data entities through the OData connection which means that we can use this to incorporate direct connections from the Finance & Operations into the Common Data Service entities and then those entities can be used by tools like PowerApps to create new forms and integrations.

Topics Covered

  • Creating Custom Entities from OData Connections
  • Creating a PowerApp using the Custom Entity

Creating Custom Entities from OData Connections

The first example that we will show is how you can use an OData feed to create a new Entity within the Common Data Service.

How to do it…

Start off by opening PowerApps and click on the + New entity link within the menu bar.


This will open up the Choose Data Service gallery where we will be able to see all of the different Data Services that we can choose to import the data through.

For this example, we will want to get the data from Dynamics 365 Finance & Operations, and we can access that data easily through an OData feed. So we will want to click on the OData tile.


This will open up the OData Connection setup form where we will be able to start defining our OData connection.


Start off by pasting in your base URL for your Dynamics 365 Finance & Operation instance and then add /data to the end of the URL.


That will then allow you to select the data gateway… although I am not entirely certain that you need this.


And then we will want to select the Authentication Kind that will be used to connect to Finance & Operations.

For this example, we will want to use our tenant credentials and select the Organizational account option.


Now we will want to authenticate so we will click on the Sign in button.


This will open up an account sign-in form where we can log in with our tenant credentials.


Once we have authenticated our account, then we can click on the Next button to continue on.


This will take us to the Choose Data form, and Power Query will start reading all of the entities that are available through the OData feed.


After a little bit, we will see all of the 1800+ entities that are available within Dynamics 365 for Finance & Operations.


We can filter out the entities to easily find the entity that we are looking for. So if we type in sellable into the filter the entities so that we can see the SellableReleasedProducts entity that will allow us to retrieve a list of all of the validated products.

All we need to do here is select the SellableReleasedProducts entity and then click on the Next button.


This will take us to the Power Query form where we will be able to see a sample set of data from the OData query.


Before we continue on, we will make a quick change and change the Name to Sellable Products to make it easier for the user to read and then click on the Next button.


That will take us to the Entity Mapping where we will make some finishing touches to the query.


We will start off by selecting the Load as new entity to tell the query to create a new Entity that used the query as a basis.


Before we continue on, we will need to specify what the index or primary field is for the entity. To do that we just click on the dropdown list for the Primary Name Field and select the index field.

In this case, we will select the ProductNumber field.


Once we have done that we can continue on and click on the Next button.


This will start the load of the data, and the creation of the data entity within the Common Data Service. When it says Completed we can click on the Done button.


That will return us to the Data integration page, and we will see that a new project has been created for us.


Creating a PowerApp using the Custom Entity

Now that we have created our custom entity within the Common Data Service we can use it within PowerApps by attaching to it as a data source.

How to do it…

To create a PowerApp, we will want to start off by selecting the type of PowerApp that we will want to create. To do this, we just click on the Choose a design mode link at the bottom of the form, and we will see that we can either create a Canvas or a Model-driven PowerApp.

For this example, we will click on the Canvas option.


This will open up the Canvas gallery. We will want to create the app from scratch, so click on the Start from blank tile.


This will open up the options for the PowerApp, and we can either create a tablet or a phone app.


We want to create a phone browser, so we will select the Phone icon and then click on the Make this app button.


Now we will be asked if we want to jumpstart the app by creating a form or gallery. For this example, we will want to click on the Create a gallery link.


In a couple of seconds, we will have a simple gallery app, that is connected to sample data.


We want to connect to the new Entity that we linked into the Common Data Service, so we will want to create a new data connection by clicking on the data connection and then click on the + Add a Data Service button.


This will open a list of all of our connections. If you haven’t connected to the Common Data Service already, then you will want to add a connection.

Here we already have a link to our Common Data Service connection.


This will open up a list of all of the entities that we have within our Common Data Service.


If we type sellable into the Choose a table filter, then we will be able to find the new data entity that we imported into the Common Data Service.


All we have to do here is select the entity and then click on the Connect button.


This will automatically map some of the fields – i.e., the Product Number.


But the Subtitle field is not mapped to the right field so we will just click on the dropdown list for the field and select the productname field.


Now the data looks a little cleaner, and we can click on the X to close the panel.


That will return us back to the canvas, and we will be able to see all of the data.


We can make the gallery a little bigger so that it fills the entire form.


And also we can browse down through the data, and we can see all of the data coming directly from Dynamics 365 for Finance & Operations.


Review

We have just connected a table from Finance & Operations and integrated it into the Common Data Service so that it acts as if it is any other entity within the system.

How cool is that.

The other day I saw an example of how prospective vendors are onboard in Dynamics 365 for Finance & Operations, and the very first step was the acquisition of the initial vendor details, which was done through an Excel import and the Data Management tools.

Although this is an OK way to do this, I was wondering if there was an easier way that we could do this, and also make the vendor request access themselves through a web page.

One of the easiest ways to gather information is through Office Forms, so I created a quick example that shows how this would be done.

Topics Covered

  • Creating a New Vendor Registration Form
  • Testing the New Vendor Request Form
  • Creating a Flow to Submit the Vendor Request
  • Using the Form to Submit a New Vendor Request

Creating a New Vendor Registration Form

The first thing that we will want to do is create the form that the vendors will be able to use to submit their initial request for onboarding. And we will do this by just creating a simple Office 365 Form.

How to do it…

Start off by going to forms.office.com and click on the New Form tile.


This will create our new form where we can start building our form.


We will start off by changing the default title of the form.


In this example, we changed the form title to be New Vendor Request.


And then we can add a little more information explaining what the form does and what the users should do with it.


If we click on the image icon to the right of the name, we can also do an image search for a logo that we want to add to the form.


Now that we have done that we can start adding our questions. To do this, just click on the Add question button.


Now we can select the type of question that we want to add. In this example, we will select the Text option.


That will add the question template for us.


We will set the first question to Vendor Name.


Now we can add a second question by clicking on the Add question button again. This next question will be for vendor segmentation, so we will choose the Choice option.


This will open up a different type of question format. We will start off by setting the name of the question to Vendor Type.


Then we will add all of the different vendor types that we want to ask for.


Now we will add a couple more questions. So just click on the Add question button again.


Then click on the Text option.


Set the Question name to Remittance address and for this field, check the Long answer option so that we can have multiple lines.


We will add one last question so just click on the Add question button again, and then select the Text option.


We will set the question name to Corporate address and also make this a long answer as well.


We can spiff things up by clicking on the Themes button in the menu bar and selecting a more exciting theme.


Testing the New Vendor Request Form

Now that we have created our form we can test it out.

How it works…

If we click on the Preview button, the form will open up just as the vendor would see it and we will be able to see all of our choices.


We can start off by entering a Vendor Name.


Then we can select the Vendor Type. In this case, we selected the Other option and was able to write in our type of service.


Then we can type in our Remittance Address.


And then our Corporate Address.

After we have done that we can just click on the Submit button.


This will submit the form to us.


If we want we can see all of the submissions by clicking on the Responses tab.


Creating a Flow to Submit the Vendor Request

Now that we have checked that our form looks good and works we will want to link it to Dynamics 365, and we will do that with flow and trigger an event based on the form being filled out.

How to do it…

We will start off this step by opening up the Flow site and then click on My flows.


This will show us a list of all of the flows that we have created and we can create a new one just by clicking on the Create from blank link.


We will see the suggested connectors, but Forms is not one of them so we will want to expand our search and click on the Search hundreds of connectors and triggers button.


This will allow us to search through all of the connectors.


All we need to do is type in forms, and we will be able to click on the Microsoft forms connector.


There is only one trigger for the Forms connector, so we will click on that one.


That will create our trigger event in Flow.


If we click on the drop-down for the Form Id and we will be able to see the New Vendor Request form that we just created.


Now we want to grab the details from the form, so we will click on the Next step button.


Then we will click on the Add an action button.


This will open up a list of all of the connectors.


We can filter down the actions by typing in forms and then selecting Microsoft Forms.


There is only one action that we can select from, and that is to get the details from the responses.


That will add the Get response details action.


We will want to click on the Form Id drop-down and select the New Vendor Request form again.


Then we can click on the Response Id and add the response id from the previous step.

Now we will want to add an action to update Dynamics. To do this, click on the Add an action button again.


This will open up the action selector.


This time, filter the actions to Dynamics actions and select the Dynamics 365 for Operations connector.


Then select the Dynamics 365 for Operations – Create record action.


That will add an action to the flow that will allow us to create a new record of Dynamics.


Click on the Instance drop-down and select the Finance & Operations instance that you want to update.


Then search through the Entity name list and select the ProspectiveVendorRegistrationRequests entity.


This will allow us to fill in the required fields for the prospective vendor from the responses in the form.

All that is left to do now is to give our Flow a name – here we set it to New Vendor Submission and click on the Create flow link.


Using the Form to Submit a New Vendor Request

Now that we have created our flow we can test it out.

To do this, start off by returning to the preview version of the Form.


Then fill in all of the information for the new prospective vendor, and click on the Submit button.


This will submit the form.


It will then trigger a flow to be performed.


We can drill into the flow and see that it successfully created the record in Dynamics 365.


If you don’t believe it, then just go to the Prospective vendor registration requests form and you will see that there is a new record there.


Review

How cool is that? We used a simple form within Office 365 to capture information and then used Flow as the integration tool to update Dynamics 365. That is too easy!