Posts

ExecuteQuery From UAT or Produ in d365 fo x++

1). Read the given link and install in your local vm   https://github.com/TrudAX/XppTools#installation

Get Default Dimension Description in d365 fo x++

  public str getDimensionDisplayValue(DimensionDefault _dimension, Name _dimensionName)  {      str dimensionValue;      DefaultDimensionView dimensionView;      select firstonly1       dimensionView       where dimensionView.DefaultDimension == _dimension       && dimensionView.Name == _dimensionName;      return dimensionView.dimensionDiscription();;  }

How to Open multiple instances of Report at the same time using X++ code in D365 Fo

  1.) Declare contract Class 2 variales     List                  customerList;     str                   customer;     [DataMemberAttribute('customer'), SysOperationLabelAttribute("customer Account")]     public str ParmCustomer(str _customer = customer)     {         customer  =  _customer;         return customer;     }     [DataMemberAttribute('customerList'),SysOperationLabelAttribute("customer"),AifCollectionTypeAttribute("customerList", Types::String)]     public List ParmcustomerList(List _customerList = customerList)     {         customerList  =  _customerList;         return customerList;     } 2). controller class  Decalre on controller class using  System.IO.Compression...

Hide Report Parameter From contract class in d365 fo x++

Add propertiy  SysOperationControlVisibilityAttribute( false ) [DataMemberAttribute,SysOperationControlVisibilityAttribute( false )] public str parmparameter(str _buffer=buffer) { buffer     =      _buffer; return  _buffer; }

Add range on List in DP Class in d365 fo x++

   1). ItemGroup  is a list type in dp class  2). chek if the list is empty  if(!ItemGroup.empty()) 3.) Convert List into container and then comvert form list to string   if(!ItemGroup.empty())         {                 InventItemGroupItemqbds.addRange(fieldNum(InventItemGroupItem, ItemGroupId)).value(con2Str(list2Con(ItemGroup)));         }

Print SSRS Report into word documnets in d365 fo x++

    static void SaveSPITOCommercialInvoiceToWord(Args _args)     {         SPITOCommercialInvoiceController controller = new SPITOCommercialInvoiceController();         SPITOCommercialInvoiceContract contract;         WHSShipmentTable shipmentTable;         SrsReportRunImpl reportRun;         str fileName;         shipmentTable = _args.record() as WHSShipmentTable;         // Pass Args to controller         controller.parmArgs(_args);         controller.parmReportName(ssrsReportStr(SPITOCommercialInvoiceReport, Report));         // Set contract value         contract = controller.parmReportContract().parmRdpContract() as SPITOCommercialInvoiceContract;         contract.parmShipmentId(shipmentTable.ShipmentId);       ...

Arabic Class in d365 fo x++

 class HA_NumHelper {     public Description numToTxt_En(real _amount, str _currency1)     {         real decimals, WordReal;         int intNum;         str 250 word, decWord, wholeWord;         int repPos, repPos1, repPoswhole;         word = Global::numeralsToTxt_EN(_amount);         repPos = strscan(word, ' and', 1, strlen(word));         intNum = _amount;         decimals = _amount - intNum;         WordReal = _amount - decimals;         if (decimals == 0.00)         {             wholeWord = num2str(WordReal,0,0,0,0);             wholeWord = Global::numeralsToTxt_EN(str2num(wholeWord));             wholeWord = strdel(wholeWord, 1, 4);     ...