Posts

External Code unique value limitation D365FO

Out of the box, D365FO provides External codes feature to capture external references for Customers and Vendors. This could be an external system reference of Customer or Vendor accounts. Standard D365FO External codes data model limits an external code value to be linked to only one account per type - meaning when customer "C0001" has an external code "MemberId" with value "M0001", system will not allow another customer "C0002" to have external code "MemberId" with value "M0001". This limitation is implemented at the table index level. However, there will be scenarios where the business requires same external code value to be allocated to multiple customer accounts. One such is multiple customer accounts linked to one dealer or some businesses having multiple accounts for same customer segregated by state or other criteria. In such cases, the out of the box index limitation will not allow same external code value to be alloca...

Reciprocal exchange rate in same legal entity

Image
In some D365 FinOps implementations, we face scenarios where there is a requirement for reciprocal exchange rate between currencies. Out of the Box, D365 FinOps calculates B to A rate when A to B rate is configured and does not allow set up of B to A when A to B rate is configured. To achieve the requirement, we can make a small customization /extension to allow configuration of exchange rate B to A, while having A to B configured in the same exchange rate type.                                                                                                                                                         ...

Legal Entity specific Currency Exchange rate

Image
Often in implementations, organizations require different exchange rates per legal entities as per the Forex rates agreed with Banks in the Legal entity country. Dynamics 365 Finance and Operations provides the feasibility via Currency exchange rate types and Ledger settings. (Understand this might be 101 for many FinOps functionals, however off late faced some D365 consultants missing this knowledge so posting to help others in need) Currency Exchange rates per type – “Default” and “USRT Default” On Ledger form in General Ledger module,  Accounting currency exchange rate type  can be setup for a Legal Entity. The below screen shots depict different legal entities setup with different  Accounting currency exchange rate type – “Default” for “USMF” and “USRT Default" This way separate Currency exchange rates can be applied in different legal entities. Happy DAXing :)

Invoicing multiple Sales order using code in AX 2012

Wondering how to post invoice for multiple Sales orders?? Below is the solution. SalesFormLetter salesFormLetter;     QueryRun queryRun;     Query query;     str strSalesTable = "000630,000631,000643";     ;     salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);     query = new Query(QueryStr(SalesUpdate));     query.dataSourceTable(tablenum(SalesTable)).addRange(fieldnum(SalesTable, SalesId)).value(strSalesTable);     queryRun = new QueryRun(query);     salesFormLetter.chooseLinesQuery(queryRun);     salesFormLetter.transDate(systemdateget());     salesFormLetter.specQty(SalesUpdate::All);     salesFormLetter.printFormLetter(true);             salesFormLetter.chooseLines();       salesFormLetter.run();

DMF data load using fixed field length files + AX 2012

Image
I have encountered scenario where I need to load data into AX 2012 using fixed field txt files from legacy system. I used DMF to upload the data. The catch is the fixed field txt file upload is different from the regular csv or excel file upload in DMF. The file format settings will be as follows. Here we need to perform additional steps to mention the field lengths of various fields and make sure they stay as-is post mapping them to the staging fields. Once we create the Processing group, Entity record for the required Entity and file format as the one created for Fixed field file, click 'Specify File Format' button and click next.   Remove all the field list and add manually the fields from the way they are coming from the fixed length file and also mention the field lengths of the fields. Click 'Finish'.     Select the file path where the file for upload is placed on the file system. Click on Generate Source mapping, th...

DMF changes in Generate methods - AX 2012 R3

Till AX 2012 R2, the Generate methods in DMF entity classes do not have attributes. These were identified by the field groups with names starting with Generate. In AX 2012 R3, the Generate methods of entity classes need to have the Attributes mentioned so that they will be recognized in the Target entity mapping. [DMFTargetTransformationAttribute(true),DMFTargetTransformationDescAttribute(<<Label for Descriotion>>), DMFTargetTransformationSequenceAttribute(<<Attribute sequence>>) ,DMFTargetTransFieldListAttribute([fieldStr(<<DMFEntityTable>>,<<FieldName>>)]) ] And there is no need for us to create the field group with <<Generate method name>>. Happy daxing :)

Code to find Electronic addresses from Postal Address AX 2012

Hi Folks, Here I present the code to find the Electronic Addresses (Email / Phone / Mobile) of a Party using Logistics Postal Address framework in AX 2012. static void FindEmailFromAddress(Args _args) { DirPartyTable dirPartyTable; LogisticsPostalAddress postalAddress; LogisticsElectronicAddress electronicAddress; LogisticsLocation logLocation;   dirPartyTable = DirPartyTable::findByNum( '000003452' ); postalAddress = DirParty::findPostalAddressByRole(dirPartyTable.RecId, LogisticsLocationRoleType::Consignment_IN);   select logLocation where logLocation.ParentLocation == postalAddress.Location;     while select electronicAddress where electronicAddress.Location == logLocation.RecId { info(electronicAddress.Locator); } }   Happy DAXing.. :)