Blog Archives - Page 52 of 171 - - Page 52

Category Archives: Blog

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)

Posted On May 11, 2021 by Hitesh Jingare Posted in Tagged in

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)

Posted On May 11, 2021 by Hitesh Jingare Posted in Tagged in

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

Posted On May 4, 2021 by Jaison Menezes Posted in Tagged in

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.

Share Story :

Document Location Merge Duplicate

Introduction: If you have duplicate records, you end up merging the records. What happens to the documents that are present on these records. Solution: We have two Contacts, one with Word “My doc” attachment and other with Word “Test” attachment. When we merge the two records and select C 1 as master record. The record c2 will be set as Inactive and the master record will have two document locations. That is how merge works for Documents. Hope this was helpful!

Share Story :

D365 CRM Data Import Pointers

Introduction: Data Import is an integral part of any Migration or new enviornment. CRM allows us to use Data Management>> Data Import wizard to easily import data from Excel files. Text data is easily imported but for data that is Lookup or Multi Select Option Set, users might face issues. This blog will guide as to how we import Data of different types. Lookup: This type of record actually relates to other entity. We need to first assure that the related record is already in system. Example- If we are importing Account with Primary Contact lookup, we need to be sure that the Contact File is already imported and data is present in CRM. Excel file should have same name that we have for existing record, so that it maps to the correct record. In case where we have deadlock in lookup, like Account has Contact and Contact has Account Lookup, we have to import one file without lookup and then update same with lookup. To be clear we need to upload Account without primary contact, then import Contact with Account and then update Account file with Contact. Multiselect Option Set : To import records with multi-select option set field, we would need to pass the option set labels with semicolon “;” as the separator. We need to take care that none of the labels are misspelled. Date: To upload dates, please check the data format in settings and take care that your Excel data is in same format. Other points: While importing data, Duplicate detection rules might cause records to fail, we need to unpublish, rules that do not satisfy our requirements. Also, It is advised to upload clean data and what better than using highlight duplicate and remove duplicate functionality of Excel. This is all in case of new records, in case you want to update records, download the static worksheet of records from Advance find, make changes and upload the exact same updated file, the data import wizard in this case will not ask for mapping, if it does recheck your steps performed.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange