D365 General Archives -

Category Archives: D365 General

Sales Return process in Dynamics 365 Finance and Operations Part 2

In the previous part of my blog, I explained about the Credit Only process. In this part of my blog, I will go through the Physical Return process. The Physical return process is determined based on the Disposition Code that is assigned to that Return Order. Disposition Codes in D365 Finance and Operations: Disposition codes in Dynamics 365 Finance and Operations (D365FO) are essential tools used to categorize and manage returned items. These codes help businesses decide what to do with products that customers send back, whether it’s restocking, repairing, or scrapping them. By using disposition codes, companies can streamline their return processes, maintain accurate inventory records, and ensure that returned items are handled efficiently and appropriately. This not only enhances operational efficiency but also helps in improving customer satisfaction by managing returns in a clear and organized manner. Below is the List of Dispositions Codes that are available in D365 FNO: These Disposition codes are available as Standard Functionality in D365 FNO.  You can also create new codes based on the business requirements. In this part of the blog, I will walk you through the Replace Item and Credit Customer scenario. Let’s take a scenario where we have sold 5 items to the customer and after delivery the customer does the Quality check in which 2 products fail due to quality issues. The customer has Scrapped those products on our behalf and now we will provide the customer with the replacement items. For that: Go to Sales and Marketing>Sales Returns>All Return Orders. On the All return orders page click New to create a New Sales Return Order. Select the Customer for which the Return Order is to be created. Enter the Site, Warehouse, RMA number and other details and click OK. In the first part of the blog I created the Return order using the Find Sales Order function so in this part I will directly add the line with negative quantity. In the below screenshot you can see that I have added a line for the Product P-000015 with negative quantity. The next step is to register the Line with the Replace and Credit customer Disposition code. For that click on the Update Line option in the Lines tab then from the drop down click on the Registration option. Then from the Disposition Code drop down select the Replace and Credit Customer option. Then add the registration line then click on Confirm Registration. In the below screenshot you can see the Line status is changed to Registered and the Return order status is changed to Open. Now if you go to the All-Sales Order Page you can see that a New Sales Order is created with the Order type as Returned Order with the Status as Open Order. Now if you open the Sales Order and check the lines the quantity of the line will be exactly same as that of the Return order. The next step is to create a Replacement order as we have selected the Disposition Code of Replace and Credit. For that click on Update Line and Click Registration which will change the Line status from Registered to Expected. As you do this you will notice that the Post Packing Slip button is now disabled, and you can see that the Replacement Order button is now available. As our disposition code is Replace and credit Customer the next step is to create a Replacement Order. For that click on the New Replacement Order button. Add the same site and Warehouse as Return order and click Ok this will create a Replacement Order. After Replacement Order is created go back to the Return Order again and Click Registration and select the Credit disposition code which will Credit the Amount back into the Customer’s account. Now after that Post the Packing slip for the Return order which will change the Return Order status to Received. Then go ahead and Invoice the Return Order from the All-Sales Order page which will again change the Return Order status to Closed. Then go ahead and process the Replacement Sales Order. If you go to the Customer transaction and check, you can see that the Amount is credited back in to the Customer Account. So, this completes the Sales Return Process of Return and Credit to customer. We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com

Share Story :

Create a New Environment in LCS for D365 Finance and Operations

Introduction In this blog, we’ll be looking into creating a new environment for D365 Finance and Operations or D365 Commerce. Pre-requisites References Configuration Go to Microsoft Dynamics Lifecycle Services and log in with your account. If you select D365 Commerce, you get the following screen. If you select D365 Finance and Operations, you get another screen where you have to specify whether the project is an actual implementation or just for evaluation after which you get the same screen as below. Once the Project is created, we get the following screen. From here, we click on the hamburger menu at the top and then click on Cloud Hosted Environments. Click on Add to create a new environment. If you get the below pop-up asking to configure an Azure Connector, please refer to my blog – “Configure an Azure Connector in LCS”. Once, you have an Azure Connector configured, you can click on Add again and get the following pop-up. After selecting the Application and Platform version, you’ll get the option to select the environment topology. DEMO – A demo environment includes only Microsoft demo data. You can use a demo environment to explore default features and functionality. DEVTEST – A DevTest environment is for development or build. You can use this environment for development or build. Then we get another pop-up to select the environment topology. After that is selected, we decide the environment name and the size of the VM that is to be used for this environment. You can read more about VM sizes here – VM sizes – Azure Virtual Machines | Microsoft Learn Once we click on Next we get the last pop-up after which the environment gets deployed. Once we click on deploy, it takes about 6-8 hours to deploy the environment after which it’ll be available in the cloud-hosted environments section. If, for some reason, you try to create an environment with the latest platform and application version and that deployment fails, you can try to create an environment one platform/application version below that. Conclusion Thus we saw how to create an environment in LCS for either D365 Finance and Operations. Happy Coding!

Share Story :

Switching of Forms using Option Set field in Javascript

Use Case – To Switch form based on the value selected from option set field. Steps – 1. We have a Option Set field – “Lead Type“ Based on the Option selected – the form will switch For example – “PMO Member” – On change of the option, it will switch to PMO Member Form “HR” – On change of the option, it will switch to HR Form 2. To get the current form Guid use the following in the console- 3. Below JavaScript Code- Hope this helps!!

Share Story :

Disable field on change of tab in D365 CE

Use case – Our requirement is to enable field description field on invoice line form on clicking of tab General. Let’s see how we can achieve this Solution – Step 1 – Create web resource with below function- var invoiceLineCustomization = {     unlockField : function(executionContext)     {         var formContext = executionContext.getFormContext();             formContext.getControl(“description”).setDisabled(false);     }, } Step 2: Add this web resource on tab property event TabStateChange and try. (path to go to event tab – Click on tab -> change properties -> event) Output – 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 :

Autosave quick create a form record on fields change and open the created record

Requirement: The user will create the record from the Quick Create and on change of specific field, the record should automatically save. Whenever the record will be saved it should open the created record. In our scenario, we are going to use the Account Entity. When the user will enter the main phone data in the Account Quick Create Form, the record will automatically save and it will open the created account record. Steps: Go to Default Solution or your customization solution and Open the Quick Create Form from Account Entity 2. Click on the Form Properties to edit the form properties of Account Quick Create Form and add the script on the form. 3. Click on the +New button to add the JavasScript web resources on the form so that you can use the script function on Form Events 4. If you wanted to use an existing Web Resource then you add it or else create new by click on new 5. Create a new Script and add it on form 6. Now, we need to add the event list and bind the calling function to it. To do it click on the + New on Event Listener of Form Properties. Note: Please don’t forget to pass the execution context as the first parameter to the function. 7. We will use formContext.data.save() function to get the created record’s GUID and open entity record using that GUID. Following is code for your reference: 8. Code Explanation: a. quickCreateonSave is a function that is trigger on change of Main phone fields of Account Quick Create. b. When the function is triggered we are using formcontext.data.save to save the save so that we can get the GUID of the recently created record. c. On formcontext.data.save() we can assign two functions — on success and failure as parameter to .then() [Reference] d. On Success, the function will return the following response where you can get the entityType, entity id, and name of the record. e. After getting the entity id and entity type, we can use the open form to open the record as mentioned in the Code. 9. Publish all the customization that you have done on the Account Entity Demo: I hope it helps you guys!!

Share Story :

Importing Notes in Dynamics 365 correctly

Preparing an Excel Template for Notes entity is a little tricky. Doesn’t work when you just Export directly as a Template from the Templates Wizard and try to include all columns and import as is. Why? Because there’s no Regarding field exported when you export/import that template. Here’s what you can do as a workaround. Scenario Now, let’s assume you want to Export a standard Excel Template for import so that you can re-import into Dynamics for Notes entity for a regarding entity. Exporting Excel Template Your Document Templates are where all your Excel Templates can be exported from – Now, follow the below – Select Notes entity and Edit Columns you need to Export the Excel with your required columns Select the columns you need. Observe that you don’t get Regarding column to export Then Download the file. Modifying the Excel Now, since you don’t have the Regarding field in the Excel you exported from Templates, here’s what you need to do – Add a column yourself, give it a proper name based on what the Notes’ Parent entity should be. In this example, I’m importing Notes for Account. So, I’m adding a column called ‘Account Name’ A new column will be created as below Now, populate your data based on how the Notes should be imported and tagged to which records. Now, by default, this template is exported in Microsoft Excel Worksheet (xlsx) format. You’ll need to Save As in CSV format Re-Importing Up until above, your Excel is ready to be imported. Let’s begin – Import the file as a usual Excel Import in Dynamics 365 CRM. Since this is not a direct Template importing as is, but a CSV, you’ll get to map this file manually. Then, you’ll need to manually select the Note entity from the drop-down and then proceed Now, whatever is mapped automatically will be mapped. For the newly created Account Name field, you’ll need to expand the Not Mapped dropdown and select Regarding (Lookup) Now, you’ll need to select the entity you want the Notes to appear under. In my case, this is Accounts, so I have it right there Since this Regarding fields supports several entities, scroll all the way down to Confirm your selection Now, your Regarding field is set and you are ready to confirm and Import Now, my Import here is completed. (You’ll need to take care the Import is successful) Imported Notes If you look at the records now, the Notes will be attached to the respective Regarding records Hope this helps!!

Share Story :

Why Custom Filter JS code doesn’t work on Lookup field? [Fixed]

One of the major pet-peeve is not understanding why the code isn’t working. And you for sure know you’ve written the correct code. But, thing just don’t work. One such tricky situation is that of applying custom filter to fields using JavaScript in Dynamics 365 Customer Engagement apps. Scenario Let’s say you have a custom filter to be applied to a field and you’ve written your JS code on Load to apply the filter and everything (you know what you need to do!) Example: But the above is just not working. Why??? Reason The reason is pretty simple! Because, the Lookup field is still using the one set on the field itself. Check that – The above should be turned off to make your code work since the field’s default OOB filtering takes precedence. And now, your code should work (Provided everything in it correct) Hope this quick tip helps!

Share Story :

Currency Field representation options in Dynamics 365

In D365 CE Apps, you have 2 options to display the currency fields, by symbol or by the currency code. Symbolic representation Currency Code representation Setting With a simple setting, you can apply this change organization wide. Navigate to Settings > Administration > System Settings and under General tab, look for Set the currency display option. Pretty simple! 🙂

Share Story :

Loading Screen using D365 CE JavaScript

Posted On March 26, 2020 by Priyesh Wagh Posted in Tagged in

Suppose, you want to show a loading/waiting screen to let people know there’s some heavy processing going on in the back-end and they shouldn’t navigate away to do anything else with the record, you can use loading screen by using showProgressIndicator() and closeProgressIndicatory() methods. Xrm.Utility methods There are 2 methods are documented in the Xrm.Utility of Microsoft Docs that you can use to achieve this. Microsoft reference here. In this scenario, let’s say you want to show the Loading page while your Action is being performed by the JavaScript code. You can place the Xrm.Utility.showProgressIndicator(message); before you begin your code to invoke an action and place Xrm.Utility.closeProgressIndicator(); in your success and failure messages. Execution Whenever your JS code will call the action, the progress message will be displayed on the screen as below  – In Classic UI   In Unified Interface –   And once the process is complete, the Xrm.Utility.closeProgressIndicator will remove the message as below and bring back the form you were working on – Side Note: If you are using action calling from JS using invokeProcessAction, as of the day of this post – This doesn’t work well and results in action not supported error on the UCI – invokeProcessAction does not work in UCI   Hope this helps!

Share Story :

SEARCH BLOGS:

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :