Author: Mohammed Salah

Fix Certificate Issues on Development Machines D365fo

  Run Command: Set-Location -Path “cert:\LocalMachine\My” $OldCert = (Get-ChildItem -Path 43082FE50B4D02562C89EA728B2363C598E84886) New-SelfSignedCertificate -CloneCert $OldCert -NotAfter (Get-Date).AddMonths(999)   change 43082FE50B4D02562C89EA728B2363C598E84886 with your “thumbprint number”   get thumbprint  with this command Get-ChildItem -path Cert:\LocalMachine\My | Where {$_.NotAfter -lt $(get-date).AddMonths(2)} | Sort NotAfter | Format-Table Subject, Thumbprint, NotAfter     reboot server

Current user and its employee Name and department X++

static void curUserInfo(Args _arg) { str sUserId; Name name; str departmentName ; ; sUserId = curUserId(); info( “Current user ID is ” + sUserId ); name= HcmWorker::find(DirPersonuser::findUserWorkerReference(sUserId)).name(); departmentName= HcmWorker::find(DirPersonuser::findUserWorkerReference(sUserId)).primaryDepartmentName(); info (“Name is ” + name); }

Report Server Error: “The request failed with HTTP status 401: Unauthorized SSRS Ax2012

I have fond out what’s causing Error: “The request failed with HTTP status 401: Unauthorized”. In Reporting service configuration manager I need to provide user account details in service account   reference : https://social.technet.microsoft.com/Forums/en-US/b49d5d82-21fd-42b5-b827-0008c9be7f32/report-server-error-quotthe-request-failed-with-http-status-401-unauthorized?forum=sqlreportingservices

Sending Email using X++ Code (AX2012/D365)

class SRSendEmail_D365 {     public static void main(Args _args)     {         SysMailerMessageBuilder messageBuilder = new SysMailerMessageBuilder();         Email   toEmail;         Email   fromEmail;         try         {             FromEmail = “sreddy@xyzcompany.com”;             toEmail   = “tester@xyzcompany.com”;             messageBuilder.setBody(“Hello from D365”, false);             messageBuilder.setSubject(“Email Test from D365”);             messageBuilder.addTo(toEmail);             // Note: not calling setFrom() defaults to the current user for SMTP client, whereas             // when sent to Outlook any setFrom() value will be ignored since profiles on the client are used             messageBuilder.setFrom(fromEmail);             //…

Management Reporter 2012 – Reset Data Mart for Dynamics AX 

Management Reporter 2012 – Reset Data Mart for Dynamics AX Management Reporter 2012 utilizes two databases. One of these databases stores report metadata, user information and other application information. Management Reporter also uses a data mart database which stores financial information in a format optimized for financial statement reporting. At times the data in this…

Convert Numbers to Arabic letters Custom Code SSRS with currency [AX2012 or D365]

Public Function ToArabicLetter(ByVal givenNumber As Double, ByVal CurrencyCode As String ) As String Dim FinalOutput, Number, NumberCurrency, Fractions, FractionsCurrency As String Dim Tafkeet = ” فقط لا غير” Dim WholeNumber() As String = Split(givenNumber, “.”) Dim CurrencyCode2 As String =CurrencyCode NumberCurrency = NumberAsCurrency(WholeNumber(0),CurrencyCode2 ) FinalOutput = NumberCurrency If WholeNumber.Length >= 2 Then If WholeNumber(1).Length.Equals(1) Then…