Показать сообщение отдельно
Старый 23.03.2019, 14:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
alirazazaidi: Journal name . does not support journal type Daily X++ Dynamics 2012 r3
Источник: https://www.tech.alirazazaidi.com/jo...amics-2012-r3/
==============

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();
}

Источник: https://www.tech.alirazazaidi.com/jo...amics-2012-r3/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.