Posts

Showing posts from 2024

How to start & stop service using .BAT file

Open the Notepad paste the belowlines Net stop "W3SVC" net stop "Microsoft.Dynamics.AX.Framework.Tools.DMF.SSISHelperService.exe" net stop "DynamicsAxBatch" net stop "MR2012ProcessService" pause  Save notepad file as name.BAT it will create  service type file type and just double click over there ===================================================================== To start the services Net start "W3SVC" net start "Microsoft.Dynamics.AX.Framework.Tools.DMF.SSISHelperService.exe" net start "DynamicsAxBatch" net start "MR2012ProcessService" pause  ==================================================================

Vendor agening report customization in d 365 fo

 Public class TECVendAgingReportController_Ext extends VendAgingReportController {      public static TECVendAgingReportController_Ext construct()      {           return new TECVendAgingReportController_Ext();      }      public static void main(Args _args)      {           TECVendAgingReportController_Ext controller = TECVendAgingReportController_Ext::construct();           controller.parmReportName(ssrsReportStr(TECVendAgingReport, DesignWithNoDetailAndNoTransactionCur));           controller.parmArgs(_args);           controller.startOperation();      }      protected void preRunModifyContract()      {         //  str  reportDesign;           VendAgingReportContract contract = this.p...

Customer ageing report Extension

 public class TECCustAgingReportController_Ext extends CustAgingReportController {      public static TECCustAgingReportController_Ext construct()      {           return new TECCustAgingReportController_Ext();      }      public static void main(Args _args)      {           TECCustAgingReportController_Ext controller = TECCustAgingReportController_Ext::construct();           controller.parmReportName(ssrsReportStr(TECCustAgingReport, DesignWithNoDetailAndNoTransactionCur));           controller.parmArgs(_args);           controller.startOperation();      }      protected void preRunModifyContract()      {           str  reportDesign;           CustAgingReportContract contract = this.par...

Can’t stop Dynamics AX Kill Batch service error

  If you are unable to stop the  DynamicsAxBatch Service from services . Then do the following steps in it: Run a  command prompt as administrator . Execute command:  sc queryex [servicename] . Press Enter Note: Service name:   DynamicsAxBatch Command:   sc queryex DynamicsAxBatch Find out the  PID  from the result of the query. Write it down to use in next step In the same command prompt, execute command:  taskkill /f /pid [pid number] . Press Enter Note: Example PID: 2145 Command:   taskkill /f /pid 2145 Now,  register yourself in the Admin Provisioning Tool.  It will not give error

form control clicked coc

 [ExtensionOf(formControlStr(WHSLoadTable, btnInboundShipConfirm))] Final class WHSLoadTableFrm_btnInboundShipConfirmButton_POR_Extension {     public void clicked()     {         FormDataSource       whSLoadTable_fds = this.formrun().dataSource(formDataSourceStr(WHSLoadTable, WHSLoadTable));         List                 getList = WHSInboundShipmentHelper_POR::getLoadIdsFromDataSource(whSLoadTable_fds);        // WHSLoadTable         whsLoadTable = this.formrun().dataSource(formDataSourceStr(WHSLoadTable, WHSLoadTable)).cursor() as WHSLoadTable;         boolean              ret = true;                  boolean validationStatus = WHSInboundShipmentHelper_POR::validateInboundShipment_POR(getList);       ...

Form control clicked event COC on form control

 [ExtensionOf(formControlStr(WHSLoadPlanningListPage, btnInboundShipConfirm))] Final class WHSLoadPlanningListPageFrm_btnInboundShipConfirmButton_POR_Extension {     public void clicked()     {         FormDataSource       whSLoadTable_fds = this.formrun().dataSource(formDataSourceStr(WHSLoadTable, WHSLoadTable));         List                 getList = WHSInboundShipmentHelper_POR::getLoadIdsFromDataSource(whSLoadTable_fds);        // WHSLoadTable         whsLoadTable = this.formrun().dataSource(formDataSourceStr(WHSLoadTable, WHSLoadTable)).cursor() as WHSLoadTable;         boolean              ret = true;                  boolean validationStatus = WHSInboundShipmentHelper_POR::validateInboundShipment_POR(getList);...

Helper class for shippment validation how to create it with infolog

/// <summary> /// Helper class for Loads /// </summary> public class WHSInboundShipmentHelper_POR {     // POR_2784_inboundShipmentConfirmation:26/11/2024 : VK:  26/11/2024 Start     /// <summary>     /// validate the conditions before inbound shipment process.     /// </summary>     /// <param name="_loadTable">     /// WHSLoadTable Table as a refernce.     /// </param>     /// <returns>     /// return true or False .     /// </returns>     public static boolean validateInboundShipment_POR(List _loadIdList)     {         boolean            ret = true;         ListEnumerator     loadIdEnumerator;         WHSLoadId          loadId;         WHSLoadTable    ...

How to replace the exiting list and fill the new list value

 /// <summary> /// Converts the <c>orderedRecords</c> map to a list. /// </summary> /// <returns>The map converted to a list.</returns> public List convertMapToList() {     InventTrans     inventTransMarked;     InventTrans     inventTransReceipt;     InventTransOrigin   inventTransOriginOfProdTable;     ProdTable           prodtable;         List resultNew = new List(Types::Record);     List result = new List(Types::Record);         RefRecId  inventtransorigirecid;     result =  next convertMapToList();     if(SFCProductionProgressTransService_POR::cachedToIdentifyForSorting_POR(false))     {         inventtransorigirecid = parameters.movement.inventTransOriginId();              while select inv...

How to use the cache intialize the value & clear the catche

/// <summary> /// Get the values in cache to get & set /// </summary> /// <param name = "clearCache">true</param> /// <param name = "_isValidated">false</param> /// <returns>boolean</returns> public static boolean cachedParmIsSavedSetUp_POR(boolean clearCache = true,boolean _isValidated = false) {     str key =  funcName() + bfpCacheType(Types::Enum);       if(prmisDefault(_isValidated))     {         _isValidated = bfpCacheGet(key,_isValidated);     }     else if(!clearCache)     {         bfpCacheSet(key,_isValidated);     }       if(clearCache)     {         bfpCacheClear(key);     }       return _isValidated; } ====================================================================== SFCProductionProgressTransService_POR::cachedParmIsSavedSetUp_POR...

Replace the value or add the value in 2 fileds

/// <summary> /// custom logic to merge the PurchaseOrderIntex_POR & PurchaseOrderLineIntex_POR /// </summary> /// <param name = "_purchaseOrderIntex_POR"> a <c>PurchaseOrderIntex_POR</c> record </param> /// <param name = "_purchaseOrderLineIntex_POR"> a <c>PurchaseOrderLineIntex_POR</c> record </param>  static str mergePurchaseOrderIntex_POR(PurchaseOrderIntex_POR _purchaseOrderIntex_POR, PurchaseOrderLineIntex_POR _purchaseOrderLineIntex_POR) {     const str Zero = '0';          int getLength;     str replaceValue;     str mergeValue;     bfpPILParameters bfpPILParameters = bfpPILParameters::find();              getLength = strlen(_purchaseOrderLineIntex_POR);         replaceValue = strRFix(_purchaseOrderLineIntex_POR, bfpPILParameters.IntexLineNumberDigits_POR, Zero);     mergeValue = str...

Get the color name on the bases of item varient along with Lang

/// <summary> /// Finds color name for particular product and language. /// </summary> /// <param name="_product"> /// Product Id. /// </param> /// <param name="_languageId"> /// Language Id. /// </param> /// <returns> /// Color name in specified language. /// </returns> public static Name getColorName_POR(EcoResProductRecId _product, LanguageId _languageId, inventdim _inventDim = null, EcoResColorName _colorID = null) {     EcoResProductMasterColor ecoResProductMasterColor;     EcoResColor              ecoResColor;     Name                     colorName;     if(_inventDim)     {         ecoResColor =  EcoResColor::findByName(_inventDim.InventColorId);     }     else if(_colorID)     {                 ecoResC...

Find the correct lot if from invoice in D 365 fo

 Today we have a req to find the correct lot if while invoice from the report below query helps to find the lot it aGainst the packing slip   /  select firstonly custpackingsliptransloc      where custpackingsliptransloc.inventtransid == _custinvoicetrans.inventtransid       join inventtransoriginloc          where inventtransoriginloc.inventtransid == custpackingsliptransloc.inventtransid       join inventtransloc          where inventtransloc.inventtransorigin == inventtransoriginloc.recid &&                inventtransloc.packingslipid == custpackingsliptransloc.packingslipid &&                inventtransloc.invoiceid == _custinvoicejour.invoiceid;

Find the inventory dimension in customer form setup pacing slip

 Today i ahve reque to fidn the inventory dimension check box in AP > Formsetup>Packingslip --> But the problem is the table is temporty that hold yes/ no so after the defug the piece of code help to Find it  custFormletterParameters custFormletterParameters = CustFormletterParameters::find(); boolean checkPackingSlipQualityChkbox = InventDimFixedClass::dimFixed(custFormletterParameters.InventDimPackingSlip,                                                                   InventDimFixedClass::fieldId2Idx(fieldNum(InventDim,InventDimension1))); Using this we can find the yes no vAlue of the particular dimensions 

Sales performa Report

 Public class PrintMgmtDocType_TEC_FreeTextInvoice_Handler {      [SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))]      public static void getDefaultReportFormatDelegateHandler(PrintMgmtDocumentType _docType, EventHandlerResult _result)      {           switch(_docType)           {                case PrintMgmtDocumentType::SalesFreeTextInvoice:                     _result.result(ssrsReportStr(TECDev3_FreeTextInvoice,ReportIN));                     break;                case PrintMgmtDocumentType::SalesOrderInvoice:                     _result.result(ssrsReportStr(TECGSTInvoiceReport_IN,ProformaReport)); ...

Code to merge the values and store in a table "strRFix"

 internal final class MergeSampleRunnableJob_POR {     /// <summary>     /// Class entry point. The system will call this method when a designated menu      /// is selected or when execution starts and this class is set as the startup class.     /// </summary>     /// <param name = "_args">The specified arguments.</param>     public static void main(Args _args)     {             str myString = '11';             str myString1 = 'Y1014678';            // private const str Zero = '0';             int len;                          len = strlen(myString);             int i = 1;             str padded;             str fi...

How to Create SSRS report

Image
 Today we will see how to create a ssrs report:- 1) Create a temp table 2) Create a contract class 3) Create a controller class 4) Create a DP class 5) Create a action menu item ======================================================================== 1) Create a temp table  2) Create a contract class /// <summary> /// Data Contract class for <c>ALBD_PrintPaymentConfirmation</c> SSRS report. /// </summary> /// <remarks> /// This is the Data Contract class for the <c>ALBD_PrintPaymentConfirmation</c> SSRS Report. /// </remarks> [DataContract] final class ALBD_PrintPaymentConfirmationContract implements SysOperationValidatable {     RecId  recId;     PurchaseOrderId confirmationNum;     PaymTermId  paymTermId;     Notes       notes;     /// <summary>     /// parmRecID     /// </summary>     /// <param name = "...