Posted in ax 2012

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 == ProjTransType::Item)
{
voucher = ProjItemTrans::find(_projPostTransView.TransId).VoucherPackingSlip;
}

if (!voucher)
{
projInvoiceLines = new ProjInvoiceLines(_projPostTransView.ProjTransType,_projPostTransView.TransId);
projInvoiceLines.run();

voucher = ProjInvoiceJour::find(projInvoicelines.tmpProjInvoiceLine().InvoiceId , projInvoicelines.tmpProjInvoiceLine().InvoiceDate).LedgerVoucher;

}

return GeneralJournalEntry::findBySubledgerVoucher(voucher, curext()).AccountingDate;
}

Posted in ax 2012

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 to log off.

System administrator -> All Users

You can check here : Option 1

User1

You can check here : Option 2

User2

Posted in ax 2012

Several transactions have been selected for settlement

 

Warning Message : Several transactions have been selected for settlement with various values, all marks have been removed

This is a known issue which we have to face almost once in a  month, User came up with the message that he is unable to select multiple transaction for settlement

SeveralTrasactionError

This message will appear when the selected lines (invoices) for settlements have different Payment Id’s, For one journal all selected invoices must have the same Payment Id’s  in order to be settled in one journal. other wise you have to create separate journals.

All vendors -> Transactions -> Payment ->Payment ID

Vendortransaction

Reference from Original Post

Posted in ax 2012

Upload Budget

Below is the Sample Code to Upload\Import GL Budget from CSV,

CS V Columns are :

  1. Date
  2. Main Account
  3. Account Type (Expense – Revenue)
  4. 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 accountType;
  boolean header ;
  recId accountStructureId;
  recId accountStructureIdLocal;
  BudgetLedgerDimensionController budgetLedgerDimensionController;
  container offsetAccount;
  int i = 0;
 Continue reading "Upload Budget"