Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 38

Latest purchase price option in the released product in D365 Finance and Operations (SCM)

In this blog, I’m going to showcase to you the impact of the latest purchase price parameter on the item purchase price. Enable the latest purchase price for any product. So whenever new purchase order is created for a product with a specific price or different price, and in case the price of the product keeps changing in every purchase order based on the recent cost price of the item in the purchase order then the price of the item is also changing in the item master. I’m showing the example of the latest purchase in the below steps: Steps to enable the latest purchase parameter in the released products Navigate to the released products. Select the product for which you want to enable the latest purchase price. Open the purchase tab, Inside Price updated to enable the latest purchase price parameter Set the price in the product master to 50 USD (you can also set the prices through a trade agreement . ) Create a purchase order for this product Create a purchase order for this product and add this item to the purchase order lines. Set the purchase price for this product to 100 Confirm the purchase order. Post the product receipt (GRN) for this purchase order. Once it’s received, invoice the purchase order. Once this invoicing process is done, go back to the product master, and open the product for which we have enabled the latest purchase price. The price for this item is changed to the latest purchase order prices (prices changes from 50 USD to 100 USD). NOTE: Inside the manage cost tab item price, you can also see the purchase price is Overrides to 100 If you want to see the history of the fluctuation in purchase prices. You need to enable the Last price history. Steps to enable the last price history. Navigate to the inventory and warehouse parameters. Select the inventory accounting tab Enable the Last price history. So you can see the price change history in the item price. I hope this helps!

Share Story :

Custom Field Validation for Website Fields in Dynamics CRM

Posted On December 14, 2022 by Vidit Gholam Posted in Tagged in

Dynamics 365 provides functionality to create a text field of type website field where the user can type in the website name. But out of the box, it has no validation to validate if the user is actually putting a web URL or just a text value, this can be achieved using simple JavaScript.  In this blog, let’s see how to put a validation on a website field in CRM so that users enter the correct data.  I have created a website field in CRM and here is how it looks.  Using the below javascript code you can put a validation on this website field. Code:       validateWebsiteURL: function (formContext, fieldName) {          if (formContext.getAttribute(fieldName)) {              var websiteurl = formContext.getAttribute(fieldName).getValue();              if (websiteurl != “”) {                  var pattern = new RegExp(‘^(https?:\\/\\/)?’ + // protocol                      ‘((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|’ + // domain name                      ‘((\\d{1,3}\\.){3}\\d{1,3}))’ + // OR ip (v4) address                      ‘(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*’ + // port and path                      ‘(\\?[;&a-z\\d%_.~+=-]*)?’ + // query string                      ‘(\\#[-a-z\\d_]*)?$’, ‘i’); // fragment locator                  if (!pattern.test(websiteurl)) {                      formContext.getControl(fieldName).setNotification(‘Website: Enter a valid Website URL.’);                  } else {                      formContext.getControl(fieldName).clearNotification();                  }              }          }      }  I hope this helps 😉! 

Share Story :

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 :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange