Introduction - Cloud architecture for Business Central
Business Central is a full cloud solution, and its architecture is illustrated in the following diagram.
Business Central is a full cloud solution, and its architecture is illustrated in the following diagram.
REST (REpresentational State Transfer) refers to a Software Architectural Style that defines the standards for exchanging information between two different systems via the HTTP Protocol. It is the most popular architecture for exchanging data on the World Wide Web.
REST defines 6 different principles for Web Services:
Any API (Application Programming Interface) that follows the above principles is referred to as a REST API. In most cases, REST APIs use XML or JSON, but the REST Architecture doesn’t require anything specific as far as this is concerned. REST does not require any particular format, but it accepts any format that can be used in Content Negotiation.
OData (Open Data Protocol) is a set of best practices for developing and using RESTful APIs. It helps you to focus on your Business Logic while creating RESTful APIs without the need to worry about various ways to define request and response Headers, HTTP Methods, Status Codes, Media Types, URL Conventions, Payload Formats, and more.
OData carries the following specifications:
REST is the most essential component technology of OData. OData 3.0 standards require OData users to follow REST principles. OData rests on HTML technology, which resolves the problem of being REST-based in a way. It supports two Protocols for Data Transfer, the XML-based Atom format and JSON.
OData also has guidance for performing actions like defining reusable procedures, tracking changes, and sending many REST requests.
It provides two models for Data Management which include:
In the next section, we will be discussing OData vs REST APIs to know how the two compare in different core areas.
OData vs REST APIs: What’s the Difference?
Let’s now discuss how OData and REST APIs compare to each other:
REST is an architecture that defines how to send messages between a Client and a Server via HTTP. It is a model that states that you can use HTTP and its verbs to perform CRUD Operations (Create, Read, Update, Delete) on the resources exposed by your Services. Thus, REST is more concerned about the architecture.
OData is a standard from Microsoft that relies on the REST Architecture to send specific types of messages over HTTP. It defines metadata in CSDL (Common Schema Definition Language) format to describe the Entity types supported by your Service and their Properties, Data types, and more. Thus, OData is more concerned about the content.
REST defines 6 principles, as has been listed above, to ensure the creation of efficient Web Services and REST APIs must follow these principles. These principles ensure the success of REST Projects.
OData is built on top of the REST Framework, thus, it depends on REST principles. Note that even though OData recommends its users to follow REST principles every time, the requirement can be relaxed in the case of a good reason. A very basic, Compliant Service should be easy to build, with additional work necessary only to support additional capabilities.
REST is used when there is a need to interact with a Data Source, for example, to retrieve data for all Products. It is easier and faster to parse data using REST APIs. It uses URI to expose the Business Logic.
The following operations are available on HTTP:
OData is best used to expose Services and APIs to Systems and Applications. It has facilities for extension to achieve the custom needs of the REST APIs.
Data transfer format is an important factor to consider when comparing OData vs REST. REST supports the transfer of data in any format. Although most REST APIs use XML and JSON formats, REST is not specific in regard to this.
OData specifies that the data should be transferred in either JSON, XML, or Atom format.
Those were the major differences between OData vs REST.
This blog discussed fine differences across OData vs REST APIs. We also discussed concepts behind OData and REST APIs, their specifications and principles.
For Businesses, extracting complex data from a diverse set of Data Sources such as REST APIs can be a challenging task. This is where Hevo saves the day by providing an efficient, reliable and fast ETL Service.
Business Central supports three types of web services: API, SOAP, and OData.
In this tutorial, we will see what is data refresh in Power BI and how to schedule refresh in Power BI. And also we will discuss
Issue:
In Power Apps (Canvas App), when use SharePoint as the data source, the date field always shows "12/31/2001" even this field is blank or not selected.
ISSUE: Can't clear a datetime field in SharePoint from PowerApps.
Dropdown menus allow app users to select a pre-defined value from a list of options. But sometimes you want the user to fill-in their own value using a text input their selection cannot be found in the list. In this article I will show you how to create a dropdown with an other option in Power Apps.
You can use Power BI reports in Power Apps model-driven apps to bring rich reporting and analytics to your main forms and empower your users to accomplish more. This unlocks the power to aggregate data across systems, and tailor it down to the context of a single record.
Embedding Power BI content is an optional feature and is disabled on all environments by default. You must enable it before you can embed Power BI content. More information: Enable Power BI visualizations in the organization.
This feature requires exporting a solution, modifying it to add the xml snippet, and then importing back into the environment. Be sure to import the changes on your target environment via a managed solution only. See Import, update, and export solutions for guidance on installing an update to an existing managed solution.
You can use Power BI reports by simply embedding them, and get the exact same report. This does not involve contextualizing them to the current model-driven form, and hence you get the same report on all records of the table. For example, the following report shows the geographic location of all accounts at once, and is useful to show summary information.
You can customize a main form XML sections
node so that it can host an embedded Power BI report and tile by following these steps:
In your development environment, create a solution and add the table that contains the main form where you want the embedded Power BI report to display.
Export the solution as managed.
Extract all files in the solution package zip file. Then, edit the customizations.xml file and add the XML code provided below inside the <sections>
block that is inside the <forms type="main">
node in the customizations.xml file.
<section id="{d411658c-7450-e1e3-bc80-07021a04bcc2}" locklevel="0" showlabel="true" IsUserDefined="0" name="tab_4_section_1" labelwidth="115" columns="1" layout="varwidth" showbar="false">
<labels>
<label languagecode="1033" description="Unfiltered Power BI embedding demo"/>
</labels>
<rows>
<row>
<cell id="{7d18b61c-c588-136c-aee7-03e5e74a09a1}" showlabel="true" rowspan="20" colspan="1" auto="false" solutionaction="Added">
<labels>
<label languagecode="1033" description="Accounts (Parent Account)"/>
</labels>
<control id="unfilteredreport" classid="{8C54228C-1B25-4909-A12A-F2B968BB0D62}">
<parameters>
<PowerBIGroupId>00000000-0000-0000-0000-000000000000</PowerBIGroupId>
<PowerBIReportId>544c4162-6773-4944-900c-abfd075f6081</PowerBIReportId>
<TileUrl>https://app.powerbi.com/reportEmbed?reportId=544c4162-6773-4944-900c-abfd075f6081</TileUrl>
</parameters>
</control>
</cell>
</row>
<row/>
</rows>
</section>
Important
Be sure to use the control classid="{8C54228C-1B25-4909-A12A-F2B968BB0D62}"
as indicated in the XML sample.
Property | Description |
---|---|
PowerBIGroupId | The Power BI workspace Id. If your report is in My workspace then the workspace Id is 00000000-0000-0000-0000-000000000000. Otherwise, add the workspace Id. You can find the Id of the workspace in the Power BI service URL. More information: Find the Power BI workspace and report Ids. |
PowerBIReportId | The Power BI report Id. Replace this with the report that you want to embed. You can find the Id of your report in the Power BI service URL. More information: Find the Power BI workspace and report Ids |
TileUrl | The Power BI report URL that you want to embed. Be sure to use the correct Power BI subdomain name (you might need to replace app.powerbi.com with your own) and report Id (replace reportId=544c4162-6773-4944-900c-abfd075f6081 with your own). For example, https://app.powerbi.com/reportEmbed?reportId=544c4162-6773-4944-900c-abfd075f6081 . |
solutionaction="Added" | If the table already exists in the target environment leave the solutionaction=Added parameter for the cell element as provided in the XML sample. If the table doesn’t exist in the target environment, remove the solutionaction=Added parameter. |
You can make Power BI reports more meaningful by applying contextual filters to the current model-driven form, so that the report is filtered based on attributes of the current row. For example, the following report shows the geographic location of an account, by filtering the Power BI report using the account name. This allows a single report to show contextualized information for all rows of the table.
The filtering is done by adding a <PowerBIFilter>
element in the <parameter>
block as shown here. You can use any attribute of the form's table to construct the filter expression. More information: Constructing Filters to understand how to create your own filters.
<control id="filteredreport" classid="{8C54228C-1B25-4909-A12A-F2B968BB0D62}">
<parameters>
<PowerBIGroupId>00000000-0000-0000-0000-000000000000</PowerBIGroupId>
<PowerBIReportId>544c4162-6773-4944-900c-abfd075f6081</PowerBIReportId>
<TileUrl>https://xyz.powerbi.com/reportEmbed?reportId=544c4162-6773-4944-900c-abfd075f6081</TileUrl>
<PowerBIFilter>{"Filter": "[{\"$schema\":\"basic\",\"target\":{\"table\":\"table_name_of_power_bi_dataset\",\"column\":\"power_bi_field\"},\"operator\":\"In\",\"values\":[$a],\"filterType\":1}]", "Alias": {"$a": "field_name_in_powerapps_to_filter"}}</PowerBIFilter>
</parameters>
</control>
Note that this uses the same control as the unfiltered report embedding, and hence the control class id remains unchanged.
This table describes any additional properties used in the previous XML sample.
Property | Description |
---|---|
PowerBIFilter | The filter expression that contextualizes the Power BI report by passing the form attributes as parameters. To make it more readable, the filter is constructed as shown here. The filter expression can't be a comma separated list of values. |
{
"Filter": "[{
\"$schema\":\"basic\",
\"target\":{
\"table\":\"table_name_of_power_bi_dataset\",
\"column\":\"power_bi_field\"
},
\"operator\":\"In\",
\"values\":[$a, $b],
\"filterType\":1
}]",
"Alias": {
"$a": "field1_name_in_powerapps_to_filter",
"$b":"field2_name_in_powerapps_to_filter"
}
}
The target part of the previous expression identifies the table and the column to apply the filters on. The operator identifies the logic and values identify the data passed from the Power Apps model-driven app. To parameterize in a generic way, the values are constructed by aliasing. In the previous expression, the value of an account's firstname and lastname are passed, and either of them is searched in the Account Name column in the Power BI report. Note that firstname and lastname are the unique names of attributes of the account table, whose value will be passed here.
You can create more complex filter expressions by looking at examples from Constructing Filters and providing the appropriate values for $schema and filterType. Be sure to escape every literal in the filter part using ", so that the JSON is generated correctly.
Before you import the solution into the target environment, make sure the unmodified attribute isn’t included in formXml section of the customizations.xml file. If the unmodified attribute is present in the XML that includes the Power BI control XML, remove the attribute before you import the solution into the target environment. For example, replace <systemform unmodified="1">
with <systemform>
.
This integration is available only in the Unified Interface client, on supported web browsers and mobile devices.
Opening this form in the Power Apps form designer will not show the control in a meaningful way. This is because the control is customized outside of the form designer.
Users will be authenticated into Power BI automatically with their Power Apps username and password. If a Power BI account with matching credentials doesn’t exist, a sign in prompt is displayed as illustrated here.
No data will display if an incorrect account is used to log into Power BI. To sign in with the correct credentials, sign out, and then sign in again.
The view of the report data shown inside Power Apps is the same as that in Power BI, and Power Apps security roles and privileges don't affect the data that is displayed. Hence, the data is essentially the same as what the creator of the Power BI dataset would see. To apply data access restrictions similar to Power Apps security roles and teams, use Row-level security (RLS) with Power BI.
If the form doesn’t show the Power BI report after importing the solution and publishing customizations, open it in the model-driven form editor and save it, so that the form JSON is regenerated.
Embedding a Power BI tile on a form is only supported without contextual filtering.
TileUrl
node of the control parameters when it may need to be. This example includes a group ID.<parameters>
<PowerBIGroupId>fd266a4c-9a02-4553-9310-80e05ee844f3</PowerBIGroupId>
<PowerBIReportId>544c4162-6773-4944-900c-abfd075f6081</PowerBIReportId>
<TileUrl>https://xyz.powerbi.com/reportEmbed?reportId=544c4162-6773-4944-900c-abfd075f6081&groupId=fd266a4c-9a02-4553-9310-80e05ee844f3</TileUrl>
</parameters>
values
has [\"$a\"]
rather than [$a]
. {
"Filter": "[{
\"$schema\":\"basic\",
\"target\":{
\"table\":\"table_name_of_power_bi_dataset\",
\"column\":\"power_bi_field\"
},
\"operator\":\"In\",
\"values\":[\"$a\"],
\"filterType\":1
}]",
"Alias": {
"$a": "field_name_in_powerapps_to_filter",
}
}