最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Journal name . does not support journal type Daily X++ Dynamics 2012 r3

AX 2012 alirazazaidi 50浏览 0评论
Hi did one customization, where I create Ledger Journal using X++ code. It was working perfectly fine with Ledger General Ledger entries. But threw error  on creating Ledger for AR,PR Payment.   I created ledger with following code snippet.  But it works only for Ledger for of Type Daily  
AxLedgerJournalTable    header  = new AxLedgerJournalTable(); AxLedgerJournalTrans    trans   = new AxLedgerJournalTrans(); container               offsetDim; LedgerJournalNameId     ledgerJournalNameId = “payment”; header.parmJournalName(ledgerJournalNameId); header.parmJournalType(LedgerJournalType::CustPayment); header.save(); I replaced the above code with following snippet it works perfectly fine, rest of the code is works fine LedgerJournalName ledgerJournalName; LedgerJournalTable ledgerJournalTable; LedgerJournalTrans ledgerJournalTrans; select firstonly ledgerJournalName where ledgerJournalName.JournalName == parameters.LedgerJournalNameId && ledgerJournalName.JournalType == LedgerJournalType::CustPayment; if(!ledgerJournalName.RecId) throw error(“@CAM184”); if(ledgerJournalName) { ledgerJournalTable.JournalName = ledgerJournalName.JournalName; ledgerJournalTable.Name = ledgerJournalName.Name; ledgerJournalTable.insert(); }
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址