Invoice Date of Posted Project transactions

Sample code to get the invoice date of Posted Project transactions, This method is used on ProjPostedTransView to dipslay the invoice date on Posted project transactions Form. display transDate InvoiceDate(ProjPostTransView _projPostTransView) { ProjInvoiceLines projInvoiceLines; ProjInvoiceJour Invoicejour; ProjCostTrans projCostTrans; ProjItemTrans itemTrans; GeneralJournalEntry gjEntry; Voucher voucher; if (_projPostTransView.ProjTransType == ProjTransType::Cost) { voucher = ProjCostTrans::find(_projPostTransView.TransId).VoucherJournal; } else if (_projPostTransView.ProjTransType … Continue reading Invoice Date of Posted Project transactions

Advertisements

Auto log off Dynamics AX

  We have an option of auto log off  , By default it's Zero which means unlimited, In certain scenario we have requirements to auto log off Dynamics Sessions when idol for certain period , Let say close Dynamics AX session after 30 minutes. then just Change 0 to 30 on user which you want … Continue reading Auto log off Dynamics AX

Upload Budget

Below is the Sample Code to Upload\Import GL Budget from CSV, CS V Columns are : Date Main Account Account Type (Expense - Revenue) Amount   static void WAJ_UploadGLBudget(Args _args) { CommaTextIO csvFile; container readCon; Dialog dialog; DialogField dfFileName; FileName fileName; BudgetTransactionHeader BudgetTransactionHeader; BudgetTransactionLine BudgetTransactionLine; TransDate budgetDate; NumberSeq numberSeq; AmountCur amount; MainAccountNum mainAccountId; str 20 … Continue reading Upload Budget

Restrict non-admin users to open multiple sessions in AX 2012

Copy Paste the Following Code in startupPost method of info class in AOT void startupPost() { xSession session; SysClientSessions SysClientSessions; UserId currentUserId; int counter;   currentUserId = curUserId(); if (!isSystemAdministrator())// Allow Admin User to login multiple time { while select SysClientSessions where SysClientSessions.userId == currentUserId && SysClientSessions.clientType == 0 { session = new xSession(SysClientSessions.SessionId, true); … Continue reading Restrict non-admin users to open multiple sessions in AX 2012

Hide Export file format : SSRS Report Viewer using X++

Sample Code to hide the Export option from SSRS report viewer using x++   STEP 1: First We need to add the reference "Microsoft.ReportViewer.WinForms" in AOT STEP 2:  Add the below code into the Form "SRSReportViewer'   public void hideExportButton()public void hideExportButton() { System.Windows.Controls.UIElementCollection children;    Microsoft.Reporting.WinForms.ReportViewer reportViewer; children = _axreportViewer_control.get_Children();    reportViewer = children.get_Item(0); reportViewer.set_ShowExportButton(false); … Continue reading Hide Export file format : SSRS Report Viewer using X++