Impulz Technologies LLC

Menu
  • Home
  • Products
    • IMPULZ Positive Pay
    • IMPULZ Product unlock
  • Solutions
    • Microsoft Dynamics 365 Finance & Supply Chain Management
    • Microsoft Azure
    • Microsoft Power Platform
      • Power BI
      • Power Apps
  • Services
    • Application Support And Maintenance
    • Azure Cloud Services
    • ISV Development
    • Project Resources
  • About Us
  • Blog
  • Clients
  • Contact Us

Impulz Technologies LLC

Microsoft Dynamics 365 Retail MPOS Customization

  • Home
  • Blog
  • Dynamics 365
  • Microsoft Dynamics 365 Retail MPOS Customization
  • August 10, 2022August 22, 2022
  • Secured_impulz

Microsoft Dynamics 365 Retail MPOS: Add custom filter in recall order search

Hello everyone, some time ago a customization request was raised from one of our Dynamics 365 Commerce clients to add a custom filter of ‘customer reference’ field from Dynamics 365 Finance and Supply Chain sales order in the recall order screen’s search options in MPOS.

The customization consists of two steps:

  • Adding the custom filter to the MPOS screen
  • Customizing the code in Dynamics 365 Finance and Supply Chain.

Adding the custom filter in recall order screen

In order to add the filter in recall order screen you have to create a view extension in the directory K:\RetailSDK\POS\Extensions\ if working in an azure hosted VM and for a local VM you have to do that in C:\RetailSDK\POS\Extensions\

Creating a view extension you have to perform a sequence of steps.

1. Start Microsoft Visual Studio 2017 or later as an administrator.
2. Open the ModernPOS solution from …\RetailSDK\POS.
3. In the POS.Extensions project, create a folder that is named RecallOrderSearch.
4. In the RecallOrderSearch folder, create a folder that is named ViewExtensions.
5. In the ViewExtensionsfolder, create a folder that is named SearchOrders.
6. In the SearchOrders folder, create a Typescript file that is named RecallOrderCustRefFilter.ts.
7. In the RecallOrderCustRefFilter.ts file, add the following code in the file.

8. You will now add the resource file for localization of the column name. In the SearchExtension folder, create a folder that is named Resources.
9. In the Resources folder, create a folder that is named Strings.
10. In the Strings folder, create a folder that is named en-us.
11. In the en-us folder, create a file that is named resources.resjson.
12. In the resources.resjson file, add the following code.

13. In the RecallOrderSearch folder, create a JSON file that is named manifest.json.
14. In the manifest.json file, add the following code.

15. In the POS.Extensions project, open the extensions.json file, and update it with RecallOrderSearch samples, so that the POS includes this extension at runtime.

After adding all the custom code clean and rebuild the project and start the project from visual studio it will show you custom changes in the recall order search bar.

Customizing the code in D365 Finance and Supply Chain

In order to customize the code in D365 Finance and Supply Chain we have to make changes in standard Microsoft service class RetailTransactionServiceTransactions. Microsoft provides delegates to handle different POS operations. registerGetListOrderSearchCustomfilterRanges delegate handle the custom filter which we added in the above steps.

For customizing the code you have to copy registerGetListOrderSearchCustomfilterRanges delegate and paste its signature in a new class RetailSearchOrderCustomFilterEvent to create an event handler. Then add the following code into it.

class RetailSearchOrderCustomFilterEvent
{
/// <param name=”customFiltersXmlElement”></param>
/// <param name=”extensionRanges”></param>

[SubscribesTo(classStr(RetailTransactionServiceTransactions), staticDelegateStr(RetailTransactionServiceTransactions, registerGetListOrderSearchCustomFilterRanges))]
public static void RetailTransactionServiceTransactions_registerGetListOrderSearchCustomFilterRanges(XmlElement customFiltersXmlElement, List extensionRanges)
{
container   conRange;
XmlElement  keyElement;
XmlElement  searchFilterValue, valueNode;
XmlNodeList childNodes;
System.Collections.IEnumerator iEnumerator;
str fieldName;
str filterValueStr;
int loop = 0, counter = 0;
if (customFiltersXmlElement !=null)
{
keyElement = customFiltersXmlElement.firstChild();
if(keyElement !=null)
{
fieldName = “CustomerRef”;
childNodes = keyElement.childNodes();
counter = childNodes.length();
for(loop =0; loop < counter; loop++)
{
if(childNodes.item(loop).name() ==”SearchValues”)
{
valueNode = childNodes.item(loop).firstChild().firstChild();
break;
}
}
if(valueNode !=null)
{
childNodes = null;
childNodes = valueNode.childNodes();
counter = childNodes.length();
for(loop =0; loop < counter; loop++)
{
if(childNodes.item(loop).name() ==”StringValue”)
{
filterValueStr = childNodes.item(loop).innerText();
break;
}
}
}
}
}
if (filterValueStr)
{
conRange = conIns(conRange, conLen(conRange) + 1, fieldName);
conRange = conIns(conRange, conLen(conRange) + 1, filterValueStr);
extensionRanges.addEnd(conRange);
}
}
}

Validate the customization

Follow these steps to validate the customization.

  1. Sign in to Modern POS.
  2. Search for customer reference by using the custom filter in the search options. You should see the custom column that you added.
  3. Filtered orders should be displayed in the grid.
Posted in Dynamics 365Tagged D365 MPOS Retail, Microsoft Dynamics 365, Microsoft Dynamics 365 Commerce, Microsoft Dynamics 365 Finance and Operations, Microsoft Dynamics 365 Retail MPOS, Microsoft Dynamics 365 Retail MPOS customization

Recent Posts

  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012
  • Dynamics 365 Finance and Supply Chain: Implement budget check via custom logic

Recent Comments

No comments to show.

Archives

  • April 2024
  • December 2023
  • November 2023
  • October 2023
  • July 2023
  • April 2023
  • February 2023
  • January 2023
  • October 2022
  • September 2022
  • August 2022
  • July 2022

Categories

  • Business
  • Dynamics 365
  • Dynamics 365 Finance and Supply Chain
  • Dynamics AX 2012
  • Introductions
  • Microsoft Azure
  • Microsoft Dataverse
  • Microsoft Power Platform
  • New Technologies
  • Power BI
  • Uncategorized

Latest Post

  • Optimizing Azure Workloads: Automate VM Startup and Shutdown
  • Landed Cost – Auto Cost Setup in Microsoft D365 Finance and Supply Chain
  • Big Data Capabilities of Azure Synapse, Databricks, and Data Factory
  • Fix Database Synchronization Errors in Microsoft Dynamics AX 2012
  • Dynamics 365 Finance and Supply Chain: Implement budget check via custom logic

Tags

Auto Cost Automation Ax2012 Azure Azure AD Azure Databricks Azure Data Factory Azure Synapse Cost Accounting D365 D365 code management D365 FO Azure DevOps Dataverse Development DevOps Duty Dynamics 365 Finanace and Operations development VM Dynamics 365 Finance and Operations Dynamics 365 Finance and Supply Chain Dynamics 365 FO Security Dynamics 365 with git Dynamics Lifecycle Services Export Freight Full Sync errors Import Item Cost Allocation Landed Cost Lifecycle Services Microsoft Azure Microsoft Dataverse Microsoft dynamics Microsoft Dynamics 365 Microsoft Dynamics 365 Commerce Microsoft Dynamics 365 Finance and Operations Microsoft Dynamics 365 version control Model Driven Apps Power Apps Power Platform Shipment SQL Error Transportation Voyages Web APIs XDS Framework
© Impulz Technologies - All right reserved.