Category Archives: Blog
Using Web Content on POS
Introduction LS Central allows us to use HTML content on the POS which includes both Text and Images. Users can add extra information related to the Items here which can assist in the POS Users to make the sales much more efficiently. In this blog, I’ll be demonstrating how to configure the same. References https://help.lscentral.lsretail.com/Content/Fields/T_10001411.htm Pre-requisites Microsoft Dynamics 365 Business Central LS Central Configuration Open Business Central and search for POS Terminals. Open the POS Terminal for the current Store and set the “Item HTML” and “Item Image” property to true. Search for Retail Items and open the Item you want to add description and image for. Open the Item Card and Go to Navigate -> Master Data -> Item HTML. Here you can specify the description for the Item that you want to be displayed on the POS and click on Save. For instance: After that go to Navigate -> Master Data -> Images and click on New. Click on Import and select the Image of that Item and then Click on OK. Go to POS and search for the Item. Double Click on the description of that Item to see the Image and the HTML Content. You can even embed Videos if required! Conclusion: Thus, in this blog we saw how we can utilize HTML content on POS. As an additional side note I’d like to mention even using Javascript is possible, to a certain extent, so for those who are curious you can even create basic games for it. Thanks for reading!
Share Story :
Get Time in Hours and Minutes from a Date Field in CRM using JavaScript.
D365 gives a functionality to create a Date and Time field where in you can provide the user to select the date or both date and time. But what if you just need the time in Hour and Minutes format from the selected date in the Date field, This can be achieved using a JavaScript. In this blog lets see how we can get the time entered in the date and time field and format it in hours and minutes format. I have created a field in CRM with field type Date and time. Here is how it looks Using the JavaScript “Date” functions you can get the Time entered in the date and time field as shown below. This code gets the date and time (hours and minutes) selected in the date field and will format the hour and minutes in the format “HH:MM“. Hour – (getHour()) Minutes – (getMinutes()) Output – Note : You can also add the AM / PM to the time string I have not added it in my time string “strTime” but have stored the value of it in “ampm“. Hope this helps !
Share Story :
Get Month | Day | Year from a Date field in CRM using JavaScript.
D365 gives a functionality to create a Date and Time field where in you can provide the user to select the date or both date and time. But what if you need just the month from the selected date in the date field or say the date or year from the selected date in the date field, This can be achieved using a JavaScript. In this blog lets see how we can split or get the Month | Day | Year from a selected date in the CRM Date and time type field. I have created a field in CRM with field type Date and time. Here is how it looks Using the JavaScript “Date” functions you can get the Month | Day | Year and Time of the entered date as shown in the below script. This code gets the date selected in the date field and splits the date into Month – (getMonth()) Note : January – December is (0-11) hence add 1 so make it (1-12). Day – (getDate()) Year – (getFullYear()) This code gives the month date and date in 2 digit format i.e. if the date is a single digit say 9 it will give it as 09. You can further use this according to your requirement either to change the date format or for many other date related customizations. Hope this helps !
Share Story :
[Quick Tip] Get SubGrid View Id using Primary Control or Selected Control for Ribbon button’s enable rule in Dynamics 365 CRM.
Use case: I have two entity Awards and Awards category. We have SubGrid on the Awards entity form for Category with Custom Ribbon button. We want to have the button should be visible on specific view only and below are steps to do so. Step 1: Configure the Ribbon Button Create a Ribbon Button, create a command and enable rule. Added enable to Command and command to ribbon button. To enable rule, create a custom rule and pass the JavaScript and parameter. Step 2: Get View id based on the CRM parameter: Now, Get Subgrid view id by passing the CRM parameter in the custom rule. When CRM parameter is Primary Control When CRM parameter is Selected Control Step 3: Write script for Enable Rule for Custom Ribbon Button. We will write a script that will enable or disable the Ribbon based on the view ID using the above code based on the passed parameter. Result: I have written the enable rule that Button should be visible only on the Active Award Category view: Result View of Current View that we get from the Controls in Web Browser Console App Full Code:
Share Story :
How to Export Text file from Business Central?
Introduction: Business Central provides you the feature to export the data in Excel in General Ledger entries, Customer Ledger entries, etc. But we can export data in a text file. In this blog, we will see how we can export data in the form of a text file. Steps to achieve the goal: Create a codeunit that will export the data in text. We will be needing Temp Blob Codeunit, Instream, and OutStream to read and write the data in the file. Below is the code which will read and write the data in the text file. You can use dynamic filename also by assigning a field value in the FileName variable; FileName: Rec_ComapanyInformation.FileNameText // FileNameText is the field present in the Company Information Page which will be used as Filename of the exported text file. We will be also using an action that will call the Codeunit function (GenerateTextFile) The output of the above code is To avoid using multiple times Write Text function if there is a lot of data that needs to be pulled from multiple fields. You can use a variable and store all the values in that variable and then assign that variable in the WriteText function. 9. The output of the above code is Conclusion: Thus we saw how we can export data from Business Central in a text file. Thank you very much for reading my work. Hope you enjoyed the article!
Share Story :
Disable field in Business Process Flow in D365 CE using JavaScript
Use case – Our requirement is to mark field Purchase time Frame disabled in Business process flow on change of disable field(custom field) on opportunity form. Let’s see how we can achieve this Solution – Step 1 – Create web resource with below function- Add header_process before schema name of field. Here schema name of purchase time frame field is purchasetimeframe. And after adding header_process_purchasetimeframe var opportunityCustomization = { //opportunityCustomization.disableField disableField : function(executionContext) { var formContext = executionContext.getFormContext(); var disable = formContext.getAttribute(“cf_disable”).getValue(); if (disable == true) { formContext.getControl(“header_process_purchasetimeframe”).setDisabled(true); } } } Step 2: Add this web resource on form load, on Save and on change of the field. And try Output – Hope this helps !
Share Story :
Starting amount showing blank in X/Z report in D365 Commerce (Retail)
In this blog, I am going to showcase how to resolve the error while printing the X/Z report from POS. In the store, go to payment methods. Select the tender Remove/ Float payment method. The payment method configuration for “Tender remove/float” was incorrect. If you don’t want to have the same problem be sure to unmark all the “tender declaration options” at this payment method. If you need to unmark after saving it you need to do it at RetailStoreTenderTypeTable.counting required there will be a record per payment method per store, so update as many as you need. After performing these steps, run Full sync from Channel Database. Refresh the POS link. You will able to see the start amount in both X/Z report. Hope this helps!
Share Story :
Issue in returning Invoice Orders in D365 Commerce (Retail)
In this blog, I am going to showcase how to resolve the error while returning invoice orders in Retail POS. When a customer will come to the shop and want to return the order which already invoices then getting following error on the POS This error was occurred because the return reason code setup is missing. Steps to Configure Return reason code. Set up return reason code groups Go to Sales and marketing > Setup > Sales orders > Returns > Return reason code groups. Select New to create a line for a new return reason code group. In the Return reason code group field, type an identifier for this group. In the Description field, type a brief phrase to explain how this group will be used. Set up return reason codes This procedure helps you set up return reason codes that you can use to indicate why a product was returned by the customer. Go to Sales and marketing > Setup > Sales orders > Returns > Return reason codes. Press CTRL + N to create a new return reason code line. In the Return reason code field, enter text to identify this code. In the Description field, enter text to describe the return reason code. Use the Return reason code group drop-down list to add the code to a return reason code group. Once all setup complete. Run 1030, 1070, 1090, and 1110 and refresh the POS link. Now you will get the below info code to enter the reason for the return and you will successfully return the invoice order. hope this helps!
Share Story :
Delete multiple tables or columns at once in PowerBI
While importing data into PowerBI we can choose the tables we want to load in the data model but we cant choose specific columns, although columns can be removed through advanced editor or by manually deleting them one by one this can also be done without using advance editor and multiple columns or tables can be deleted at once. To do this go into the data model section of your PowerBI report. Now expand the desired table and the press ctrl key on your keyboard and select the columns you want to delete. You can also select multiple tables using the same instruction. After selecting multiples columns or tables right click and select “Delete from the model” option. In the dialogue box that appears click on the “Delete” button. Then click on “Apply Changes” option which will appear in the window and you can see all those columns are now deleted Hope this helps!
Share Story :
Hide and show slicer pane with a toggle button
Sometimes we would want to toggle some visuals in PowerBI on the basis of a button click for instance when clicking a button a certain visual shows up and while clicking the same or another button the visual hides itself. This can be easily done with the help of bookmarks in PowerBI. In this blog we will hide and show the slicer panel. First let’s insert a right arrow button from the Buttons option in the insert tab. And place this newly created button in the extreme left of our report canvas. Now click on View tab from the Ribbon and enable Bookmarks Pane and Selection Pane. Click on Add option in Bookmarks and create a new bookmark named Slicer Invisble Now again go to Insert tab and from shapes draw a Rectangle over the button. Now on the rectangle add a slicer and populate it with desired values also add a left button so as to close the slicer pane. Now add another bookmark named Slicer Visible in the Bookmarks pane. Now in the selection pane hide the first button we had created and update the Slicer Visible Bookmark. Similarly keep the first button visible and keep the shape, slicer, and second button hidden. Update the Slicer Invisible bookmark accordingly. Right click on both the bookmarks and uncheck the Data option so as to not record changes in data. Select the second button and toggle the Action button as on from type select bookmark and from bookmark select slicer Invisible. Similarly click on the first button and set its action to slicer visible bookmark The toggle buttons will open and close the slicer pane as required. Thank you for reading my blog hope it helped.