Posts

Showing posts from August, 2024

Getting value from model that is not refered in your custome model in d365 fo x++

Declare field and add function  fieldName2Id and add Table and write field name  "Salesman" FieldId Salesman            =   fieldName2Id(tableNum(LedgerJournalTrans),"Salesman");             if(Salesman)             {                 Tmptable.EmployeeNumber         = ledgerJournalTrans.(Salesman);                 Tmptable.EmployeeName       =   HcmWorker::findByPersonnelNumber(Tmptable.EmployeeNumber).name();             }

Convert PDF Report into Base65str in d365 fo x++

     public Notes runReportandGenerateBase64()     {         PaymentReceiptController      controller = this;         SRSPrintDestinationSettings     settings;         Notes                           reportDataInBase64;         Array                           arrayFiles;         SRSProxy                        srsProxy;         Map                             reportParametersMap;         BinData bindataLoc = new BinData();         System.Byte[]                  ...

Delete Sql Server Logs in d365 fo x++

 USE AxDB;   GO   -- Truncate the log by changing the database recovery model to SIMPLE.   ALTER DATABASE AxDB SET RECOVERY SIMPLE;   GO   -- Shrink the truncated log file to 1 MB.   DBCC SHRINKFILE (AxDBNew_log, 1);   GO   -- Reset the database recovery model.   ALTER DATABASE AxDB SET RECOVERY FULL;   GO