Dynamics 365 Archives - Page 32 of 88 - - Page 32

Category Archives: Dynamics 365

Sort on Related Column in a View

Introduction:   When we create a view, We can configure the sort but the sorting is available only for the columns which are a part of the entity on which the view is created. Eg: In the active accounts view, there is a column ” Email” which is a field from Contact Entity. If we see the columns available for sorting we cannot see Email. However, in case you want to sort on a column from the related entity we can do it using the view designer and Fetch Xml builder tools from the XRM Toolbox. Solution: On load of My active accounts, the default sort is on Account Name Open View Designer on XRM Toolbox Click on Edit Query to open Fetch XML Builder We can see the order attribute is on name Now, we can edit and add order attribute to emailaddress1 After you click on Return FetchXML, you will return back to view designer. Then click on edit XML and remove the disable sorting on the attribute. You can now save and Publish.   Conclusion: The View My active accounts will be by default sorted by email address in ascending order.

Share Story :

Tender-based discounts in Dynamics 365 Commerce(Retail)

Some Retailers may want to encourage customers to pay via cash in their Retail stores. This can be made possible by offering discounts to customers if they pay by a Cash mode of payment. In this way, they can help reduce the expense of credit card processing fees. Therefore, retailers might provide discounts to customers who use these alternative tender types. In Dynamics 365 Commerce (Retail) a new type of discount has been introduced which is called as tender based discount. In tender based discounts, as a Retailer you are able to give different discounts based on the payment medium the customer has chosen to pay. Even though tender-based discounts reduce the subtotal of the transaction, automatic charges that are applied to the transaction aren’t affected. For example, if the delivery charges are calculated as $5 because the subtotal was more than $100, and the tender-based discount reduces the amount so that it’s less than $100, the delivery charges are still $5 for the order. In the system you can go to Retail>Pricing and discounts >Tender discount. Here you can set up the parameter as required, add price groups and then run necessary jobs to apply it in Retail POS. In the below example the payment type selected is Cash. You can select any type of method as per your need.

Share Story :

“You are not authorized to send mail on behalf of the specified sending account.” – Resolved.

Introduction: We had requirement where we wanted to send Email using Power Automate. We had already implemented this using Work Flow. While implementing this using Power Automate, we started receiving mentioned issue “You are not authorized to send mail on behalf of the specified sending account.” We had similar issue while implementing the same using Work Flow, But it did not work for the Ms Flow, after doing RND we came to know that we need to give permission to send the mail on behalf of another user.   Solution : Please follow the below steps to give permission to specific user. Step 1: Go to  Admin Center -> Select Exchange Admin Center. Step 2: Click on Recipients and Select User you want to give permission and  follow the steps as shown below. Step 3: In this scenario, We wanted to send Email from Admin on behalf of Support User. Below are the Steps to Give the Permission: i.   Go to mailbox delegation. ii.  Click on the “+” icon and add User from which you want to send Email. In this scenario, we wanted to the send Email by Support. So, add Admin into Send as and Send on behalf and Full Access. ->Save and try to run the flow. Hope this will help you while sending an Email on behalf of the another User.

Share Story :

How to Copy and Paste in Power Automate

Introduction Power Automate has finally got one of the most awaited features. Let me explain it to you. So, if you are willing to deploy similar type of actions inside flow, you had no option but to write each action separately from the beginning. phew! That sounds like lot of work! But now, thanks to Power Automate, flexible solutions have emerged to save time and create better user experiences, which means now you are not required to write each action distinctly every time right from the start, instead just copy and paste actions in Power Automate! Voila! There you go! Copy Click on ellipsis (…) on action which you want to copy or duplicate. Click on “Copy to my clipboard” Paste Click on “Add an action” Go to “My Clipboard” Under My Clipboard you can see all the actions which you have copied. Select the action which you want to paste.

Share Story :

Test Automation on MS Dynamics CRM using TypeScript Library

Nowadays, Test Automation is the most important requirement for any company to check Quality assurance of their product or software. There are very few tools available for Test Automation of MS Dynamics CRM. In this blog, we are going to see how we can do Test Automation using TypeScript Library (D365-UI-Test). It is the opensource library you can edit as per requirement and if any issue is present in the repo you can create an issue on Github Repo. Florian Krönert will resolve the issue as soon as possible. GitHub Repo Link: https://github.com/digitalFlow/D365-UI-Test Setup and Installation: We will use Visual Studio Code because it is a lightweight Code Editor with integrated Git support. And we will require git to clone directory, and we can do operation directly from the VS Code editor itself.   Installation Process: First, we will be required D365-UI-Test Source Files So, we need to clone that Repo from GitHub remote GitHub Repo to Local Machine in your working project directory. To open Terminal inside the VS Code use the keyboard shortcut Ctrl + `   In terminal run following git command to clone the directory git clone https://github.com/DigitalFlow/D365-UI-Test.git Now after cloning the repo, we need to install the required Node Packages that are required to run the Project.   To Install the required Node Packages, navigate in the project directory in the VS Code and run the following command. npm install “npm install” command will install the required Node Packages with a specific version which will be defined in the “package.json” file. After the installation of all required packages.   Now, we can see the sample test cases written in the “TypeScript” in “spec” Folder. To write your own test cases we need to add our test cases and run the Project. Following is the Folder structure of the D365-UI-TEST Project you will get after setup:   In the above screenshot, you will able to see the “spec” folder, we can add our own Test Cases but there are some sample test cases available for the UCI “xrm-uci-ui-test.spec.ts” which is written in TypeScript.   Now, we must add the settings.txt file in the folder structure so that we can pass the CRM Login Credential to the Test Case File. Or else you can directory pass credential in the Test Case itself.   After Adding the setting file, we need to give the relative or absolute path of the Setting file as follows:     Following is a test case to login to CRM instance and created the Account Record:   To the Run the Open the Integrated Terminal to Visual Studio Code. OR Press Ctrl + ` And Run the following command: npm run test   It will run all the tests and show the result as to which test as passed and failed. If the test is failed, then it will show the error of why the test has failed.   Once the test is run from the terminal it will open the chromium-browser and start the test. You can see the Documentation of the Library in GitHub or in following mentioned link: https://digitalflow.github.io/D365-UI-Test/

Share Story :

Trigger Power Automate on Condition

Introduction This blog explains how we can trigger Power Automate based on the required condition. Suppose you have a requirement where you want your flow should get trigger based on some condition then you can check condition on “Trigger” itself rather than adding a new action to check condition. Use Case: Trigger flow when Lead is created and Lead Source Type is “Trade Show” Trigger flow when Lead is created and Flag is “Yes”. Trigger Flow when Lead is created, Lead Source Type is “Trade Show” AND Flag is “Yes”. Trigger Flow when Lead is created, Lead Source Type is “Trade Show” OR Flag is “Yes”.   Steps to be followed: Trigger flow when Lead is created and Lead Source Type is “Trade Show” Click on Ellipsis (…) –> Click on Settings Go to Trigger Conditions and Click on “+Add” Add condition. @equals(triggerBody()?[‘leadsourcecode’],7) NOTE: “Lead Source” is an option set field add value of that option to check. After adding condition click on Done. Test your flow.   Trigger flow when Lead is created and Flag is “Yes”. Repeat step number 1 to 3. NOTE: Flag is the “Two Option” field for two option set fields use true or false in condition. @equals(triggerBody()?[‘cf_flag’],true)       Trigger Flow when Lead is created, Lead Source Type is “Trade Show” AND Flag is “Yes”. Repeat step number 1 to 3. AND Condition @and(equals(triggerBody()?[‘cf_flag’],true), equals(triggerBody()?[‘leadsourcecode’],7))   Trigger Flow when Lead is created, Lead Source Type is “Trade Show” OR Flag is “Yes”. Repeat step number 1 to 3. OR Condition @or(equals(triggerBody()?[‘cf_flag’],true), equals(triggerBody()?[‘leadsourcecode’],7))

Share Story :

Develop Custom Workflow:Counting Journals workflow

In this blog, you will learn how to develop a custom workflow that is not present out of the box in D365 Finance. For this blog I’m creating a workflow for Counting Journal (Inventory management>>Journal Entries>>Item Counting>>Counting) because there is no such workflow for inventory management module. The followings are steps that are to be followed. Steps:- 1.       Create a base Enum for Document Status 2.       Create a table extension and add Enum to table 3.       Add document status field to form extension 4.       Create query 5.       Create workflow category 6.       Create a workflow type 7.       Now add can submit workflow and updateworkflow methods to tables class extension 8.       Update submitmanager class 9.       Update EventHandler class 10.   Workflow approval creation 11.   Add an element to workflow Type 12.   Now add workflow setup form to the inventory management module Now we are performing steps in detail 1.       Create a base enum for Document Status Make sure you have created a solution, project and assign the model to the project. Now add new item and select Base Enum. And Add Base Enum and name it as CFS_InventoryCountingWorkflow   2.       Create a table extension and add enum to table We are creating a workflow for inventory management so we need to create an extension of InventoryJournalTable and drag above created base enum to table which will create a new field of type Enum.   3.       Add Document status field to form extension Now we need to create an extension of form InventJournalCount and add newly created table field to forms grid by dragging it from data source to form grid control and assign label as approval status.   4.       Create query Now again add a new query to project and name it as CFS_InventoryCountingWorkflow and add the InventJournalTable and set properties as follows   5.       Create workflow category Now we are going to add Workflow category to project and name it as   CFS_InventJournalCounting and set the properties as follows   6.       Create a workflow type After adding workflow category its time to add workflow type name it as CFS_InventoryJournalCounting  and set its properties as follows this will create new elements such as classes and action menu items for submit and all actions.   7.       Now add can submit workflow and updateworkflow methods to tables To add a method to the table we need to create a table class extension for that add a new class and name it as InventJournalTable_CFSExtension and need to add updateWorkflow and canSubmitWorkflow methods. You can use the following code [Extensionof(tableStr(InventJournalTable))] final class InventJournalTable_Extension {     public boolean canSubmitToWorkflow(str _workflowType)     {         boolean ret = next cansubmitToWorkflow(_workflowType);             ret = this.CFS_InventoryCountingWorkflow == CFS_InventoryCountingWorkflow::Draft;             return ret;     }     public static void updateWorkflowStatus(RecId _documentRecId, CFS_InventoryCountingWorkflow _status)     {         ttsbegin;             InventJournalTable document;             update_recordset document         setting CFS_InventoryCountingWorkflow = _status         where document.RecId == _documentRecId;             ttscommit;     } } 8.       Update submitmanager class Make sure you have the same name for submitting manager class or rename it as follows and following code to that public class CFS_InventoryJournalCountingSubmitManager {     private InventJournalTable document;     private WorkflowVersionTable versionTable;     private WorkflowComment comment;     private WorkflowWorkItemTable workItem;     private SysUserId userId;     private boolean isSubmission;     private WorkflowTypeName workflowType;     public static void main(Args args)    {           //  TODO:  Write code to execute once a work item is submitted.         if (args.record().TableId != tableNum(InventJournalTable))         {             throw error(‘Error attempting to submit document’);         }         InventJournalTable document = args.record();         FormRun caller = args.caller() as FormRun;         boolean isSubmission = args.parmEnum();         MenuItemName menuItem = args.menuItemName();         CFS_InventoryJournalCountingSubmitManager manager = CFS_InventoryJournalCountingSubmitManager::construct();         manager.init(document, isSubmission, caller.getActiveWorkflowConfiguration(), caller.getActiveWorkflowWorkItem());         if (manager.openSubmitDialog(menuItem))         {             manager.performSubmit(menuItem);         }         caller.updateWorkflowControls();    }     /// <summary>     /// Construct method     /// </summary>     /// <returns>new instance of submission manager</returns>     public static CFS_InventoryJournalCountingSubmitManager construct()     {         return new CFS_InventoryJournalCountingSubmitManager();     }     /// <summary>     /// parameter method for document     /// </summary>     /// <param name = “_document”>new document value</param>     /// <returns>current document</returns>     public Inventjournaltable parmDocument(Inventjournaltable _document = document)     {         document = _document;         return document;     }     /// <summary>     /// parameter method for version     /// </summary>     /// <param name = “_versionTable”>new version table value</param>     /// <returns>current version table</returns>     public WorkflowVersionTable parmVersionTable(WorkflowVersionTable _versionTable = versionTable)     {         versionTable = _versionTable;         return versionTable;     }     /// <summary>     /// parameter method for comment     /// </summary>     /// <param name = “_comment”>new comment value</param>     /// <returns>current comment value</returns>     public WorkflowComment parmComment(WorkflowComment _comment = comment)     {         comment = _comment;         return comment;     }     /// <summary>     /// parameter method for work item     /// </summary>     /// <param name = “_workItem”>new work item value</param>     /// <returns>current work item value</returns>     public WorkflowWorkItemTable parmWorkItem(WorkflowWorkItemTable _workItem = workItem)     {         workItem = _workItem;         return workItem;     }     /// <summary>     /// parameter method for user     /// </summary>     /// <param name = “_userId”>new user value</param>     /// <returns>current user value</returns>     public SysUserId parmUserId(SysUserId _userId = userId)     {         userId = _userId;         return userId;     }     /// <summary>     /// parameter method for isSubmission flag     /// </summary>     /// <param name = “_isSubmission”>flag value</param>     /// <returns>current flag value</returns>     public boolean parmIsSubmission(boolean _isSubmission = isSubmission)     {         isSubmission = _isSubmission;         return isSubmission;     }     /// <summary>     /// parameter method for workflow type     /// </summary>     /// <param name = “_workflowType”>new workflow type value</param>     /// <returns>current workflow type</returns>     public WorkflowTypeName parmWorkflowType(WorkflowTypeName _workflowType = workflowType)     {         workflowType = _workflowType;         return workflowType;     }     /// <summary>     /// Opens the submit dialog and returns result     /// </summary>     /// <returns>true if dialog closed okay</returns>     protected boolean openSubmitDialog(MenuItemName _menuItemName)     {         if (isSubmission)         {             return … Continue reading Develop Custom Workflow:Counting Journals workflow

Share Story :

How to Add Workflow form for D365 finance and Operation modules

In D365 Finance and Operation for some modules, there is no Workflow setup. eg:- Inventory management module. In such a case, we need to perform the following steps after which you can see the workflow setup form which will include all the workflows for that specific module. First, we need to add the Display menu item and set properties as: Enum Type parameter to ModuleAxapta and Enum Parameter to the module ( in our case Inventory ) Object Type to form. Object to WorkflowtableListPageRnr   After this create a menu extension of the module where we need to place the form. Drag the display menu item to the menu extension.   After a successful build,  we are set to enlist new workflows for an inventory module using workflow forms. The same way you can attach workflow form to the new module as follows:- Create an extension of ModuleAxapta Base Enum Add a new element to base enum and name it your custom module name and label it Create a new Display Menu Item and set its properties as follows Create a new menu and set its label and name as per your requirement And insert your display menu item to your custom menu/module Create an extension of “MainMenu” Menu and add new menu item reference and set its properties as follows Build the solution your Workflow setup form will be visible for that module

Share Story :

How to fix Client found response content type of ”, but expected ‘text/xml’

While running Integration map from Salesforce to AX we might encounter blank response received but expected text/xml. In current use case existing user was deactivated and new user was added into salesforce. To fix this kind of issue we can follow below steps: Login to the salesforce environment Go to setup Following screen will open and go to quick find and type “Outbound Message” Following screen will open click on continue Then you will see the outbound message list Click on edit and change user name In this way we can fix the blank response issue in salesforce.

Share Story :

How to Capture Error Description and Error Log Date in Script Component in SSIS

Our Scenario: To resolve the Errors that occur due to  componentMetadata130 and to capture the Error Log Date and Error Description while doing custom Error Handling in SSIS use the following steps. Solution: Error Handling at OLEDB Source Block: Step 1: Add a Script Component to catch the Error Description, Error Log Date and Entity. Select Transformation and click on Ok. Step 2: Connect the Error Output (Red Arrow) from OLDEB Source to the Script Component. Select “Redirect row” for all columns in the Error and Truncation Columns to redirect Error Output to Script Component. Step 3: Configure the Script Component as following: In Input Columns section Select Error Code and Error Column. In Inputs and Outputs section Add following Columns Column Name Data Type Length ErrorDescription Unicode string [DT_WSTR] 500 ErrorLogDate database timestamp [DT_DBTIMESTAMP] —- Entity string [DT_STR] 50 In the Connection Managers Section add a new connection and select your SQL connection. In the Script Section click on Edit Script. After a minute a New Editor Window will Open. Here you have to copy and paste the following Script inside the “public override void Input0_ProcessInputRow(Input0Buffer Row)” section. Code Snippet: try             {                 Row.Entity = “Unit”;   Row.ErrorDescription =      this.ComponentMetaData.GetErrorDescription(Row.ErrorCode);                 Row.ErrorLogDate = DateTime.Now;             }             catch (Exception ex)             {                 Row.ErrorDescription = “Unable to get Error Column Name”;             } Click on Save and then Close the Window. Step 4: Add a Data Conversion Block to avoid any Truncation Errors because of Data Type Conversion between NVarchar and Varchar Data Types of the Error Description Column. Select ErrorDecription Column and select Data Type as String. Click on OK. Step 5: Connect the Output columns of Script Component to the required Destination Columns. Conclusion: This is the simplest way in which we can record the Error Description and Error Log Date while custom Error Handling in SSIS.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange