Posts

Showing posts from November, 2024

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)); ...