Posts

Showing posts from March, 2023

Types of discounts in retail

 1) Simple Discounts : (its is like discount on a product with some percentage)  2) Mix and Match discounts : (its like buy 1 get 1 ) 3) Quantity discounts : (more quantity we buy more discount we get) 4) shipping threshold discounts : (its a mode of devlivery discount like if we buy big product we no need to pay extra money for shipping charges) 5) channel   tender discounts : (its like payment method of discount like if you pay by credit or debit card we will give some more discount on the ptroduct)

Select a data integration (import/export) strategy in x++

    it is always wise to be aware of available integration tools. The following integration patterns are available for finance and operations apps: OData Batch data API Custom service Consume external web services Excel integration OData :   It  is a standard protocol for creating and consuming data. The purpose of OData is to provide a protocol that is based on Representational State Transfer (REST) for create, read, update, and delete (CRUD) operations.  Batch data API : Use the batch data API in scenarios that require one or both Data management package REST API and Recurring integrations.  Both APIs support data import scenarios and data export scenarios. Custom service : A developer can create custom services for finance and operations apps. When a developer writes a custom service under a service group, the service group is always deployed on two endpoints: SOAP endpoint  – Code examples for consuming custom services using SOAP are available...

Azure Service Bus

Image
  Azure Service Bus is a fully managed enterprise message broker with message queues and publish-subscribe topics (in a namespace).  Service Bus is used to decouple applications and services from each other, providing the following benefits: Load-balancing work across competing workers Safely routing and transferring data and control across service and application boundaries Coordinating transactional work that requires a high-degree of reliability Data is transferred between different applications and services using  messages . A message is a container decorated with metadata, and contains data.  The data can be any kind of information, including structured data encoded with the common formats such as the following ones: JSON, XML, Apache Avro, Plain Text. Queues Messages are sent to and received from  queues . Queues store messages until the receiving application is available to receive and process them.

formDataFieldStr for modified and formDatasourcestr for validateWrite and validateDelete method using chain of command

//  formDataFieldStr  [ExtensionOf(formDataFieldStr(PurchTable, PurchLine, ItemId))] final class BASSupplement_Extension {         public void modified()     {         FormDataObject formDataObject = any2Object(this) as FormDataObject;         FormDataSource formDataSource = formDataObject.datasource();         PurchLine purchLine;         SuppItemTable supplementItem;           next modified();           purchLine = formDataSource.cursor();           while select * from supplementItem             where supplementItem.ItemRelation == purchLine.ItemId         {     ...

x++ code to create Service class and helper in x++ through postman

 step1 : Create a Contract class code:  [DataContractAttribute("BAS_SalesOrderContract")] class BAS_SalesOrderContract { // these are the two parameters we will pass in the request body of the postman     str             salesStatus;       str             dataAreaId;     [DataMemberAttribute("salesStatus")]     public str parmSalesStatus(str _salesStatus = salesStatus)     {         salesStatus = _salesStatus;         return salesStatus;     }     [DataMemberAttribute("dataAreaId")]     public str parmdataAreaId(str _dataAreaId = dataAreaId)     {         dataAreaId = _dataAreaId;         return dataAreaId;     } } Step2: Create a Response Contract class // In this class we will write what is the response we want from the...

how to import model in x++

  To import the model open command prompt as admin and run the following script: Step1: C:\AOSService\PackagesLocalDirectory\bin Step2:  ModelUtil.exe -import -metadatastorepath=C:\AOSService\PackagesLocalDirectory -file=C:\Users\Administrator\Desktop\BASOFAMicroServices-BASOFA.axmodel

Form Data Source Level and Form Data Field Event Handlers in x++

//  Activated Event Handler    [FormDataSourceEventHandler(formDataSourceStr(SalesTable, SalesLine), FormDataSourceEventType::Activated)]     public static void SalesLine_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)     {         SalesLine        salesLine   = sender.cursor();         info(strFmt("%1", salesLine.ItemId));     } //  Modified Event Handler     /// <summary>     ///     /// </summary>     /// <param name="sender"></param>     /// <param name="e"></param>     [FormDataFieldEventHandler(formDataFieldStr(SalesTable, SalesLine, ItemId), FormDataFieldEventType::Modified)]     public static void ItemId_OnModified(FormDataObject sender, FormDataFieldEventArgs e)     {            FormDataSource salesLin...

X++ code to create purchase order with dialog box parameters (vendor account number , site id, warehouse id , item number ) in D365 F & O

 class BASPurchOrderCreation extends RunBase {     DialogField VenAccount, itemNumber, inventSiteid, inventLocationid;     VendAccount vendAccount;     ItemId itemId;     InventSiteId SiteId;     InventLocationId LocationId;             Object Dialog()     {         Dialog dialog;         dialog = super();         // Set a title fordialog         dialog.caption( 'Purchase Order Creation');         // Add a new field to Dialog         VenAccount = dialog.addField(extendedTypeStr(VendAccount), 'Vendor Account' );         itemNumber = dialog.addField(extendedTypeStr(ItemId), 'Item Number' );         inventSiteid = dialog.addField(extendedTypeStr(InventSiteId), 'Site ID' );         inventLocationid = dialog.addField(exte...

Environment planning

  Environment planning overview To begin, here are a few important concepts: Environment purpose  – The reasons why the environment exists. Examples include development, system testing, user acceptance testing (UAT), and operations. Environment topology  – The composition of the environment and the purpose. Examples include  Develop  and  Build and Test  for Tier-1 environments. Environment tier  – The type or category of the environment. Examples include Tier-1 environments and Tier-2 environments. Environment types You can use the following environment types for your project: Standard  – This environment is included in the standard offer and is managed by Microsoft in a Microsoft subscription. Standard environments include the production environment and a Tier-2 Standard Acceptance Test environment. Add-on  – The add-on environments are in a Microsoft-managed subscription that the customer has purchased in addition to the standard offe...

Debugging and UAT Testing in D365 Fin&Ops

  The Step Into button will go into the Insert method to continue debugging. The Step Over button will go to the next line and not descend into the Insert method. The Step Out button will run the code until the function is complete and not go into the Insert method. C:\Users\Administrator\source\repos After all customer requirements have been handled by either configuration, customization, and integration, we need to know how to perform user acceptance testing (UAT) in finance and operations apps to validate the solution.  User acceptance testing is an important step in the go-live preparation. You can perform automated tests by using the Regression suite automation tool (RSAT). To test and evaluate the customer solution prior to go-live, we need to have an environment of finance and operations apps, with all the configurations and possible customizations through extensions. It is always beneficial to have a methodology to ensure that creation and testing is organized and pla...

How to Create a wizard in x++ d365

Image
 step1: Create a form and apply form pattern as wizard step2 : create a class and extend the class with SysWizard. code :            class BAS_WIzardScreen extends SysWizard {     #MACROLIB.AviFiles     FormName formname()     {         return formstr(BAS_WIzardForm);  // name of the wizard form     }     public void run()     {         info(strFmt("Thankyou"));     }     public void setupNavigation()     {     }     public boolean validate()     {         return true;     }     public static str description()     {         return "BASOFA WIZARD";  // title of the wizard     }     public static void main(Args _args)     {         BAS_WIzardScreen wizard = new BAS_WIz...

how to export model in x++

 first step: C:\AOSService\PackagesLocalDirectory\bin second step: ModelUtil.exe -export -metadatastorepath=C:\AOSService\PackagesLocalDirectory -modelname="D365FOAcademy" -outputpath=C:\Users\Administrator\Desktop