Category Archives: Blog
Hide Profile Section from Power Apps Portal Header Navigation Bar
The Power Apps Portals Primary Navigation Header always has a section to the profile page as shown in the snapshot below. It is possible to disable this by adding a Web Page Access Control Rule, this will restrict read access to the profile page, but what if you don’t want to remove the read access and you only want to remove the Profile Section from the header, here is how to do it. The Primary Navigation or Navigation on the portal is a part of the portal’s Header Component, this header component comes from the Header Web Template, It is not possible to edit this template from the Power Apps Portal Studio. To be able to edit this template we will have to use the portal management app Step 1: Go to Portal Management App, under templates search for Header Template. Step 2: at line number 104 or after line number 95 search for Class “dropdown-menu” in an unordered list (ul) and comment the below code. Ding!! We have done it. Hope this helps 😉!
Share Story :
Map Newly Registered Portal Contacts to Existing CRM Contacts in Power Apps portal (Azure AD)
Power Apps Portal allows us multiple ways to authenticate users, users can login either by using a User ID and Password for local login or using SSO logins like Azure AD, etc. Users can also register themself through the portal, when a user registers from the portal this creates a new contact with the user’s details and email ID in CRM. But what if the contact already exists in your system? To map the registered portal user with this existing contact instead of creating a new contact we need to enable/add a site setting. Site Setting – Authentication/[Protocol]/[Provider]/AllowContactMappingWithEmail More on Protocol & Provider – https://learn.microsoft.com/en-us/power-apps/maker/portals/configure/configure-portal-authentication For Azure AD login which is provided by default, you can use the Site Setting – Authentication/OpenIdConnect/AzureAD/AllowContactMappingWithEmail Reference Microsoft Document – https://learn.microsoft.com/en-us/power-apps/maker/portals/configure/configure-site-settings#portal-site-settings I hope this helps 😉 !
Share Story :
Dynamics 365 New Store Commerce App Overview, Setup, and Installation
This blog explains how to configure the Microsoft Dynamics 365 Commerce Store Commerce app and applies to Microsoft Dynamics 365 Commerce version 10.0.25. The Store Commerce app in Dynamics 365 Commerce is the next-generation offering for physical stores. It combines Modern Point of Sale (MPOS) and Cloud Point of Sale (CPOS) into a single application, provides deployment choices to retailers, and helps improve performance. At the same, it retains all the functionality of MPOS and CPOS, including extensibility. Store Commerce supports local hardware stations and offline usage, and can be directly integrated with a payment terminal, printer, and cash drawer. The Store Commerce app provides commerce functionality for below first-line workers Cashiers Sales Associates Inventory Associates Stock Clerks Store Managers Benefits of Store Commerce Store Commerce provides the benefits of both MPOS and CPOS. Performance is significantly improved. POS and extension upgrades are simplified through the Commerce sealed installer framework. Dedicated hardware station is supported. Offline deployment is supported. Application lifecycle management is simplified. Extension or independent software vendor (ISV) code that is developed for MPOS or CPOS by using the Commerce software development kit (SDK) can be reused in Store Commerce with minimal changes. Store Commerce supports two types of deployment topologies: In-app: All the components, such as Modern Point of Sale (MPOS), are deployed locally. Offline mode and local Hardware Station (HWS) are supported. Hybrid: Store Commerce renders the Cloud POS that is deployed in Commerce Scale Unit (CSU) and supports local Hardware stations. However, offline isn’t supported. There are no separate installers for the hybrid and in-app topologies. The deployment options are determined by the parameters that are passed during installation. In-app Deployment For the in-app deployment option, the application content is locally deployed in Store Commerce, just as for MPOS. To update the application content, run the latest version of the Store Commerce installer. The application content won’t be updated if you update the CSU. Therefore, you can manage the updates at individual registers. The in-app mode supports offline mode. Therefore, during installation, pass the –installoffline parameter to deploy the offline database. During offline mode (that is when there is no connectivity), the application won’t be able to connect to CSU or Commerce headquarters and will use the locally deployed CRT. Note: During the installation of Store Commerce, users can pass parameters to select either the hybrid option or the in-app option. The default option is in-app deployment. Hybrid Deployment Store Commerce is a shell that renders CPOS and connects to Headless Commerce and Commerce headquarters by using CSU in online mode. In hybrid mode, Store Commerce app content is rendered from CPOS that is hosted in CSU. When the Store Commerce app is opened, it will prompt for the CPOS URL. To update Store Commerce, just update the CSU. Store Commerce will then automatically receive the update. Because updates are centrally managed in CSU, they don’t have to be managed at individual registers. Setup and Installation Prerequisites Windows 10 version 17763.0 or later, Windows 11 (Pro, Enterprise, LTSC, and IOT Enterprise editions), or Windows Server 2019 (Standard, Essentials) Dynamics 365 Commerce (Commerce headquarters and Cloud Scale Unit) The .NET Framework version 4.7.2 or later. See Install the .NET Framework SQL Server Express, SQL Server Standard, or SQL Server Enterprise (required only for offline mode). For information on which SQL Server edition to use, see Commerce offline implementation and troubleshooting. Device setup in Commerce headquarters For Store Commerce, a new application type that is named Store Commerce has been added on the Devices page (Retail and Commerce > Channel setup > POS setup > Devices). Select this application type when you create a device for Store Commerce. Note: If the Store Commerce application type doesn’t appear on the drop-down menu, try to run the Initialize function from the General tab of the Commerce parameters page (Retail and Commerce > Headquarters setup > Parameters > Commerce parameters). Device installation from LCS Store Commerce can be downloaded from the LCS Shared asset library. On the Shared asset library page, select Retail Self-service package as the asset type, and then find the file that ends with Store Commerce. After the file has been downloaded, follow these steps to install the app. Go to the folder where you downloaded Store Commerce and open PowerShell in administrator mode. In PowerShell, find the Store Commerce installer, and pass the install parameter to install the app. To install offline components, pass the –installoffline parameter. (For example, enter Store_Commerce Installer_exe_name install –installoffline.) If you want to enable debugging mode during installation, pass the –enablewebviewdevtools parameter. Store Commerce installation parameters You can also use the help command in PowerShell to find information about all the parameters. In PowerShell, find the Store Commerce installer, and then enter Store_Commerce Installer_exe_name help install. Parameter Description installoffline Deploy the offline database. sqlservername Specify the name of the SQL Server instance that Store Commerce uses in offline mode. If you don’t specify this parameter, the installer will use a default instance. skipsqlfulltextcheck Skip validation of the SQL Full-Text Search that is required for offline deployment. trustsqlservercertificate Trust the SQL Server certificate when a connection is established to SQL Server. To help avoid security risks, you should never use this argument for production deployments. By default, the SQL Server certificate isn’t trusted. enablewebviewdevtools Enable developer tools for Store Commerce. If you don’t specify this parameter, developer tools will be enabled only if Windows Developer Mode is enabled. retailserverurl Specify the default Retail Server URL to use for Store Commerce. If you don’t specify this parameter, the user will be prompted to enter the Retail Server URL during device activation. useremoteappcontent Use the remote application content to download the Store Commerce app content from CPOS that is hosted in CSU. By default, the local application content that is deployed with Store Commerce is used. skipversioncheck Skip the validation during downgrade. skipurlcheck Skip the validation of URLs that are passed to the installer. logdirectorypath Specify the path of the log’s directory. config Specify the path of the configuration file that will be used as part of the installation. verbosity Deploy the offline database. help Show parameter information. version Show information about the app version. … Continue reading Dynamics 365 New Store Commerce App Overview, Setup, and Installation
Share Story :
Dynamically filter required Fields/Columns from a Record’s BPF and Form and apply Requirement to those fields
Hi Everyone, Let me explain this topic with an example of a scenario that you might encounter. I’ll walk you through how to complete this scenario in a concise manner below. Use Case Let’s say you have a Table (Entity) with or without multiple Business Process Flows (BPFs) that include some required Fields and even on the Form. Even if the required fields are empty and you want to change a field or flag within the form and save the record. We must disable all required Fields on the Form and then re-enable the requirements for those fields. We can do this with some simple JavaScript code. Step 1: Find a trigger point for your JS function to be called.It can be done with a Ribbon Button or by manually changing a Field. Find the code you’ll need below. I’ll be using Ribbon Button to trigger my JS Function. Quick Tip: You cannot get any Attribute Value of a Field residing in BPF directly. You need to get the entire Control of the Field and then call its attribute values. Step 2: Register your JS function onto your Ribbon Workbench or OnChange of any Field on Form. Since I called my function using Ribbon Button, I used “OpportunityForm.executeMain” with Parameters; “CRM Parameter -> Primary Control“ If you’re calling the JS using Field OnChange, then register the function as “OpportunityForm.executeMain” and do pass ‘executionContext‘. In this case, your part of the script will change as below (use this if you use JS on your Form only) OUTPUT This is how all fields will have no requirement on the Form. I took this output before re-enabling the requirement level for the fields. That’s all, I hope this helped you
Share Story :
Import an API and all its operations using its documentation in Azure API Management
Most of the time you would need to import an entire API collection with all of its supported operations to mask all of them or set policies on them. This can be easily done using Azure API management service. To start, log in to your Azure Portal, head over to the API management resource, and go to the API section on the left. From the options, select OpenAPI definition. Here I will use the Pet store API, https://petstore.swagger.io/ Go to the site or the site where your API stores the collection of all supported operations in JSON format. You can either have the JSON file of the collection or a website. In the OpenAPI specification put the link to your JSON collection or upload the JSON file and fill in the rest of the details and click on the Create button. You can see the list of operations appear. Hope you enjoyed this blog!
Share Story :
Mask your APIs using Azure API management
Most of the time you don’t want to show the original API URL or want to hide the original URL for security purposes in your code. This can be easily achieved if we assign this original URL to some other URL so end users can’t find out what’s the original API. So let’s see how this can be achieved. First, log in to your Azure Portal. Search for Azure API management service and create a new resource. Select the desired azure region and resource group. Give a unique name for this resource as the API URL will be based on this. For testing purposes set the Pricing tier as Developer. Proceed through the rest of the options as default and create the resource. Make sure to grab a coffee as the deployment takes around 45 minutes to 1 hour and you will see this screen only. When the deployment completes, you will receive an email, alerting you that the process is complete. Click on ‘Go to resource’ from the Deployment screen. You can find the new URL by getting inside the resource. Now let’s add a sample API so that we can mask it. In this case, I will use https://catfact.ninja/fact this api gives us random facts about cats. Go to the API section on your API management resource. Select the HTTP option, so that we can manually define this API and fill in the details Now save this API, you can see it on the left pane. Next, we have to add an operation for this API. Select GET operation and place the request to the main URL. In this case, the request was /fact We can test this API through the test tab and as you can see it’s working. Now we will use the main URL which will be used to mask the original API. As you can see this is not working. This happens as each API needs to be bound with a product. Go through the Products section and choose unlimited. ‘Starter’ has a rate limit of 5 calls per 60 seconds, The ‘Unlimited’ policy does not have this limitation. Click on ‘Add API’. Select your API. You will get a notification saying the API has been added to a product. Now to view this API we need a subscription, head over to the settings section on the left pane, disable the required subscription option, and then save it. Now again hit our main API through a browser, as you can see it’s working. I hope this blog helped you 🙂
Share Story :
Create and deploy your first Azure Function using Visual Studio
In my previous blog, we created and deployed an Azure function using the Azure Portal itself. Now In this part of the blog, we will see how we can create and deploy Azure Function using Visual Studio. To proceed you would need ASP.NET and Azure Development extensions installed on top of your Visual Studio. If you haven’t had these installed you can go to Apps and features on your device and modify the installed program by selecting the change option instead of Uninstall. After installing these extensions, Create a new Project and search for Azure functions. Give the Project any desired name. Set the trigger for the function as HTTP. A sample piece of code will get loaded. In this scenario, I will modify the default code and write my custom logic, which adds two numbers. To run this logic, press F5 button on your keyboard and copy the URL, hitting this URL will trigger our function. Paste and run this URL in a web browser. As you can see on hitting the URL the function gets triggered and our two numbers get added in the output. Now we have to publish our function, it’s been working amazingly. Right-click on the Project Name and click on the Publish button. Select the target as Azure. Select Specific Target as Azure Function. Select the desired Function app instance or create a new one. Click on the final publish button. Wait for the function to successfully get deployed. Now we will check this in the Azure Portal and trigger it from there, Log in to the Azure account. You will find the recently deployed function in the left pane in the Functions section. Open this function and get its URL. Paste and run this URL in a web browser. You can see the output. Hope you understood the process of deploying serverless Azure functions using Visual Studio. Have a great day!
Share Story :
Create your first Azure Function using the Azure Portal
Learning serverless Azure Functions and deploying them, might sound like a daunting task. Azure functions are one of the most essential features of Microsoft Azure. In this article, we will see how we can create and deploy our first function using Azure Portal itself. In the next blog, I will also demonstrate how we can publish functions using visual studio. To start, login into your Azure Portal. Search for the Function app and click on create. Select desired resource group, give your function app a unique name, and fill in the rest of the options as required. After the deployment completes, open the resource. Go to the functions section on the left-hand pane. Click on the Create button. Select the “Develop in Portal” option as we are using Azure Portal to create our function. And select “HTTP trigger” now as we want to trigger the function using its API. Go to the “Code+Test” option, you’ll find a sample code. Change values in it for a personal response. You can also change the logic of the code from default. Here I am passing my name as Body in the request (input) section. As you can see based on the request body I have received a personified response. You can use the get function URL option and display desired output on hitting the URL. The output section in the default code is the last line “return new OKobjectResult(youroutput);” Hope you learned to deploy a function using the portal from this blog. Have a great day!
Share Story :
CI/CD Pipeline using YAML file
This is blog is intended to share information about creating a CI / CD Pipeline using YAML file. Case Study Create a CI/CD pipeline using YAML for a web application So, let’s start with lets creating a project Use cmd to create a project and then bind it to a solution Create Solution dotnet new sln -o Test_CI_CDPipeline Then change the directory cd Test_CI_CDPipeline Then create a Web Project inside Test_CI_CDPipeline dotnet new mvc -n Test_CI_CDPipeline Now bind the project to solution dotnet sln HelloWorldApp.sln add HelloWorldApp.Web\HelloWorldApp.Web.csproj Need to restore all the dependencies dotnet restore Now, build the solution. Do not restore dependencies while we are building the solution. dotnet build –no-restore –configuration release Publish the solution dotnet publish –no-build –configuration release. Now a project is created, built, and published on local Machine. The aim is to achieve the same using a continuous integration pipeline. For this one need to have an Azure DevOps account. In that, create an organization (if not created already) and then create a project. You can either create a private project or a public project. Before that, one needs to initialize git in the location machine. Go to the working folder (location of the location file). Initiate the git git init The purpose of git is to host the source code. Ensure that binaries created while building a project should not be included. For this add gitignore file to the project. Now, you need to stage all the content git add . Commit the content git commit -m “—Name-it—” Now you can push this to the Azure DevOps repo. Copy and paste the command and everything from the local machine will be pushed to Azure Repo. Create Pipeline Go to Pipelines on the Left panel and click on Create Pipeline. It gives two options YAML or Classic editor. Select Azure Repos Git (YAML) as it will be used to push the local project in further steps Select the project created earlier Select the type of project you are creating After this, you will see a YAML file. Here one needs to edit the file and make changes as per the need. Below is a sample code Trigger: specifies which branches cause a continuous integration build to run Pool: specifies which pool to use for a job of the pipeline. A pool specification also holds information about the job’s strategy for running. Steps: specifies a list of tasks that need to be run Task: specifies commands/tasks that need to perform to achieve a build file. Build the project first Publish the Project Publish it as an Artifact Click save and run. Below shows the artifact created Now, this artifact needs to be consumed by an Azure website. For this, one needs to create a web application. Create an app service for that in the Azure portal. We need to create a service connection to connect Azure resource. Go to Project Setting, then service connections Create a New connection and select Azure Resource Manager Choose Automated (here you need to login with the same credentials that you use for the Azure portal) and click next Choose the subscription and Resource group. Give a name to the connection Now, proceed with creating a release pipeline Select the template you want to use and then apply. Choose the artifact from where you want the files to be picked up and click add Click on Job to a stage Add your Azure subscription, select the app service you have created, and save it. Then click on Create release Click on Deploy Once you are done deploying, click on the URL from the App service
Share Story :
Make form read-only using JavaScript
One way to lock down a form is through JavaScript. Let’s go through how to do this by looking at the code. var formCustomizations = { disableForm: function (executionContext) { let formContext = executionContext.getFormContext(); let formControls = formContext.ui.controls; formControls.forEach(element => { if (element.getName() != “” && element.getName() != null) { element.setDisabled(true); } }); } } Here when the JavaScript Function Is called and the execution parameter is passed, the user can see the desired output. formContext.ui.controls; Provides the properties and methods to retrieve information about the user interface (UI) controls for several sub-components of the form. formControls.forEach(element => { if (element.getName() != “” && element.getName() != null) { element.setDisabled(true);} Here the forEach loop will traverse and see if there are any fields that are not blank and the field value is not null, then set all that fields to read only on that form. Hope this helps!