Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 54

Last and First Expression in Cloud Flows – Part II

We have already seen how to extract character from string in Cloud flows. Let see how we can get first and last value in array. I have array of list of records (account records), want to get 1st value in array. Array – Add a compose step in flow and use below syntax to get first value. Syntax- first(<array>) Output – Similarly, we can get last value in array. Syntax – last(<array>) Output – Hope this helps !

Share Story :

Automated statement Posting in D365 Retail (Commerce)

The Retail statement functionality in D365F&O is the process that puts everything together and makes sure transactions from POS flows into D365F&O HQ.   If you are using shift-based statements, a statement will be calculated when the shift is closed. Using shift-based closing can be tricky, but I highly recommend doing this! After the statement is calculated and there are no issues, the statement will be posted, and an invoiced sales order is created. 1. Manually create a new “blank” batch job 2. Click on “View Tasks”. 3. Add the following 4 classes: Class Name Task Description RetailCDXScheduleRunner Upload channel transaction(P-job) RetailTransactionSalesTransMark_Multi  Post inventory RetailEodStatementCalculateBatchScheduler Calculate statement RetailEodStatementPostBatchScheduler Post statement Here I choose to include upload of transactions, post inventory, calculate statement and post statement into a single batch-job. Click on each task, Under the general tab. Set ignore task failure to YES.  Do this process for all task in the job. And click on the “parameters” to set the parameters on each task, like what organization notes that should be included. Add this parameter to Post inventory, Calculate Statement, Post statement. On each batch task I also add conditions, so that the previous step needs to be completed before the batch-job starts on the next. Provide condition to Post inventory, Calculate Statement, Post statement according to there sequence. Click on recurrence and set the recurrence that when the statement done. The benefit of this is that when you are opening the statements workspace you mostly see statements where there are cash differences, or where the issues on master data. Now you will able to post statement automatically as per set time in recurrence. Hope this helps!

Share Story :

Configuring Scheduled Jobs – Part I

Introduction: In this blog, we will be seeing Scheduled Job configuration for Data Replication using Data Director. Scheduled Jobs comprise of two parts: the Job Header and Sub-jobs. In the Job Header, we define different parameters for the Jobs like, Error Handling, To and From Locations, Compression Types, Scheduling details and the sub-jobs. In the Sub Jobs, we define where to get the schemas of the table, the tables to replicate, methods of replication, filters on the data to be replicated, linked tables, etc. References: LS Retail Data Director User Guide (ls-one.com) Isolation Levels in SQL Server – SQLServerCentral Distribution Sublocations, Scheduler Job Header (lsretail.com) Distribution Restrictions, Scheduler Job Header (lsretail.com) Pre-requisites: Microsoft Dynamics 365 Business Central LS Data Director Configuration: General: Job ID :- A unique Identifier for this Scheduled Job. Scheduler Job Type Code:- It is a kind of category for this Job, we can use this category as a filter when we configure NAS Services. Subjobs Defined By Job:- Specifies where system is supposed to fetch sub-jobs from for this Job. Generally it is the same as “Job ID” but LS allows you to create a job with its sub-jobs defined in another job. Location Settings: In this tab, we specify where the Data is supposed to come from and where the data is supposed to go. There are multiple ways to configure this, From Multiple Locations to Single Location Set the “From Dist. Restrictions to “Include List”. Click on Navigate -> Jobs -> Sender Location List. Add all the locations that you want to pull the data from.  Set “Distribution Restrictions” to “Single Location” Set the Location in “To-Location Code” field.  From Single Location to Multiple Locations – This is the similar to the previous one simply reversing where we set the values. Set “From Dist. Restrictions” to Single Location and set the location. Set “Distribution Sublocations” to “Included in Replic.”, this field is used to specify whether Data should be sent to sublocations(POS Terminals) or not. Set “Distribution Restrictions” to “Include List” and Go to Navigate > Jobs > “Receiver Locations Include/Exclude.”  Add all the locations you want to send the Data to.  From Multiple Locations to Multiple Locations Simply set Include List on both sides and add all the locations that the data is supposed to come from and where it is supposed to go. Schedule Details Here we specify how often this Job is supposed to run. You can schedule the Job to run every day, hour, minute or second as per your needs. In the above example, I have scheduled the Job to run every 15 minutes, every day. Do note that you need to have NAS Services configured for the jobs to run automatically. Data Replication: Here we have to define the “Subjobs”, which are in essence, tables which are to be replicated. Note:- In the DD Setup tab, there are advanced settings which can be used to control the compression type and SQL Isolation levels. More information regarding that can be found in the aforementioned references. Conclusion: Thus, we saw how to create a Scheduled Job Header, there are a lot more things that can be done with this like, using different codeunits for Data Replication, Object Replication Or simply running Codeunits for automating tasks. Thanks for reading!

Share Story :

Using POS Data Tables in LS Central

Introduction: POS Data Tables are used to display data from any table in POS. The default POS Screen that we see where we enter our items for sale also consists of a Data Table. Data Tables are also used with Lookups, Record Zooms and Data Grids. In this blog, we are going to create our own POS Data Table based on the Customer Table. References: https://help.lscentral.lsretail.com/Content/LS%20Retail/POS/Data/Data%20Tables.htm https://help.lscentral.lsretail.com/Content/Fields/T_99001565_11.htm https://help.lscentral.lsretail.com/Content/Fields/T_99001565_14.htm Pre-requisites: Microsoft Dynamics 365 Business Central LS Central Demonstration: The most important fields in the General Tab are: Field Description Data Table ID Specify a unique ID for this Data Table. Table No Specify the ID of the Table, whose data this Data Table will be showing on POS. Table Columns Specifies the columns that will be visible in the Data Table. Table Rows Specifies how many rows should be visible by default, if there are more you can simply scroll. Key Value Fields Specifies the key fields of the select table. Start Position Defines which record should be selected when this Data Table is opened. Selection Mode This is useful when you are using your Data Table in a lookup, the options available are “MultiSelect“, “SelectOne” or “NoSelect.” Default Search Type Specifies the search type, the options available are: “Any Part“, “Beginning” or “Whole.“ Default Search Command You can specify different searching commands like Filter, Search or Find. Distribution Location Specifies where the POS Data Table should get the data from.Do note that Web Service configuration should be done for this to work and if the record you selected does not exist on your local system, you may get an error. For Data Table Columns: In this tab, we specify the columns we want in our Data Table and the properties of those columns. Field Description Column No. Specifies the order of the Columns Field No. Specifies the Field No. to be used from the Table for the column. Key No. Specify a value in this field if you want to search using this field. Fixed Filter Specify a value in this field for filtering the table. Preferred Width Specify the preferred width of the column. Default Column Setting this value to true, makes the current column be selected by default when opening the data table. Sort Fixed Setting this value to true, disables changing the sort order for that column. Special Field Type  It is used to identify that the current column is a special type of field, there are very limited options on this field and we usually do not need to use them. Read more at Reference #3. Editable Makes the field modifiable when we use Record Zoom Controls. Validate Input Validates the input when we use Record Zoom Controls. Filter Tags Used to set a filter using “POS Tags” on that column. POS Command Code Used to specify a Command which is to be executed when user clicks on this column. A good example of this is the “Quantity” column of main POS Screen which executes the “Change Quantity” command when clicked on it. Conclusion: Thus, we saw how to create our own Data Table and the different properties associated with a Data Table. Thanks for reading!

Share Story :

Disable field on Click of Button in D365 CE using JavaScript.

Use Case – One of my requirements is to disable the field on click of button Reopen Project on Project form. Let’s see how we can achieve this. Solution – Create Web resource and add below function: Here my function name is “markFieldsReadOnly“. Create Solution in CRM which contains only a single entity on where we have button called “Reopen Project”. Open same solution in XRM Toolbox -> Ribbon Customization.          In Order to get form Context from Ribbon, Pass CRM Parameter – Primary Control  Select Library which is your web resource and add Function Name and publish. Hope this helps!

Share Story :

Let’s get started with Azure Function for Dynamics 365 CRM: Part 1

In this blog, we will learn how to create an Azure Function App to connect it with Dynamics 365 CRM and perform the CRUD operation in Dynamics 365 CRM. First, we will create an Azure Function project for Dynamics 365 CRM from Visual Studio, and below are the steps for the same. Open Visual Studio and create a new Azure Function Project. Filter platform as Azure, select Azure Function, and click on Next. Name your project and click on Create button. After clicking on Create, you will get the below screen where you need to select the Trigger and Azure Function v1 (.Net Framework) and click on Create. In my case, the Azure Function trigger will be Http Trigger which means when an azure function will receive an HTTP request it will trigger. Your Azure Project will be created and the following will be the structure of the project. Now, we will create Azure Function to connect with the Dynamics 365 CRM we need to add the required NuGet Package [Microsoft.CrmSdk.CoreAssemblies]. To add the NuGet Package right-click on the Project and click on Manage Nuget packages. Add Microsoft.CrmSdk.CoreAssemblies in your Project. Following is the code to connect the Dynamics 365 CRM. Currently, we are going to use the credential by specifying them in the C# Code or you can use it as constant. Later in the series, we will learn how to use Environment Variable and pass the credential more secure way in Azure Function using Azure Key Vault. [Stay tuned..!!] Now, select the code and Refactor the code and make the connection function that will return the IOrganizationService if the connection is established else return null. Now, the final code will be as below: Now, we will create a customer with a Hardcoded name when the function is triggered with an HTTP request. Update the existing code with the below code: Testing: We will require the API testing tool, here I am using Postman and the following is the link to download “Postman”. https://www.postman.com/downloads/ To test the application, click on the Start button on top of Navbar as mentioned below in the screenshot [Button will have Project Name]. It will take a few minutes to Load the Azure Emulator Following is the screen you will be able to see and copy the URL highlighted in the red below and paste that URL in Postman. Open the Postman and click on the create a new tab; Select request as POST and paste the URL: After pasting the URL, click on Send You will get the following response on the Azure Function Tool and Postman If there any error or issue with the Azure Function code, the request will be failed and will be displayed on both Azure Function Tool and Postman [Status will be “4**” or “5**” ] Now, we will take look at Dynamics 365 CRM environment and check whether the account is created or not. We are justing getting started with Azure Function for Dynamics 365 CRM and stay tuned for more in this series. Upcoming blogs 1. How to use Dynamics 365 Credentials securely using Azures Function. 2. How to create Dynamics 365 integration with Third-party Applications. Many more……

Share Story :

Sign in Error on POS because of Azure AD account is not mapped in D365 Commerce (Retail)

Many customers use Azure Active Directory (Azure AD) to manage user credentials for those services. In those cases, the customers might want to use the same Azure AD account across applications. Before a store worker can use an Azure AD account to sign in to the POS application, the Azure AD account must be associated with that worker. At times you will get an error while sign in POS for employees. Even when you add Associate Existing identity for the worker in HQ. Follow the below steps: Go to Azure portal, Click on Azure active directory. Go to user and select the user Copy the External Sub Identifier. Inside AX HQ, go to Commerce shared parameter Inside Identity Provider, Add azure AD link. Inside relying parties Add user External sub identifier for the same. Inside https://commerce.dynamics.com/auth provide below relying parties. Inside https://commerce.dynamics.com/authcc provide below relying parties. Run 9999 job from Channel database. After full Sync Activate POS again. you will able to sign in successfully. hope this helps!

Share Story :

Change Currency format in D365 Customer Engagement

In this blog we will see how we can change the currency format in D365 CE. We are using the Currency field named Price on Account form and we wanted to price in XX,XX,XXX.XX format Let see how we can achieve this. Solution: Go to Settings and click on Personalization settings. After clicking on Personalization setting, In Set Personal Options click on Format. Click on Customize -> in Number, Digit group change the format as per requirement. After updating click on Apply and Ok. In our requirement, we wanted currency in XX,XX,XXX.XX  format on Account Entity. Price field Before Changing – Price field after changing –

Share Story :

How to Modify Existing Report Layout in Business Central

Introduction: To modify the layouts you can remove the fields, tables, or change the position fields. There is an option to extend the Table and Page but to make changes in the existing report there is no extension yet but there is a way you can change the layout of the report. Steps to achieve the goal: Search for Report Layout selection. Select the Report ID which you want to modify. Go to Process ->Custom Layout.  Make a copy of the layout file to do that select new action it will ask you to insert RDLC or WORD according to it will create a file. Then go to layout action in Custom Layout Page->Export layout. Make changes in that file again. Import new modified layout using Import layout action. Make sure to update the layout. Import layout will only import your file you need to update as well. And then go to the Report layout selection page choose the selected layout of the report to be Custom Layout and select your modified report file in the Custom layout description. You can test your new report by Reports-> Run Report. Conclusion: Thus we saw how we can change the layout of existing reports using Report Layout Selection. Thank you very much for reading my work. Hope you enjoyed the blog!

Share Story :

Using Custom POS Commands in LS Central

Introduction: LS Central provides an easy way to add Custom functionality through the use of POS External Commands. These commands are executed on the POS and let me know you how to create them. For this example, we will create a POS Command, to remove all the lines from the current transaction. Pre-requisites: Microsoft Dynamics 365 Business Central On Premise V16.5 LS Central V16 Demonstration: You will need a Codeunit in which we define all the custom commands, all your Custom commands can be added in a single Codeunit. Make sure to set the “TableNo” property to “POS Menu Line” table. In the OnRun trigger, we have to handle two cases: Registering the module and associated commands. Procedure to execute when a command is called. For handling the first case, we create a procedure “Register” which takes a “POS Menu Line” as a parameter. In this procedure we use the “POS Command Registration” codeunit to register this module and all the associated commands. I prefer to use Global Labels to store the Module Code/ Module Description and Command Code/Command Description, as this way, any and all changes need be done only once but it is not necessary. Once this is done, the next step is to register the POS Module, this can be done in two ways: Using Retail Modules: Search for Retail Modules in BC Search. Click on “Process” and then “Register.” Search for your Codeunit and click on OK. Using “POS External Commands”: Search for Retail Modules in BC Search. Click on “Process” and then “Register” Search for your Codeunit and click on OK. You can confirm that your commands are visible by checking the list of POS External Commands. Now on the POS, we right-click on a button and click on “Button Properties” Then set your custom command, Now we add multiple Items. And when we press the button, this is the result, as expected. Conclusion: Thus, in this blog, we saw how to create Custom commands which can be used on POS. Thanks for reading!

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange