static void VendPaymJournalCreate(Args _args)
{
LedgerJournalTable jourTable;
LedgerJournalTrans jourTrans;
LedgerJournalTableData jourTableData;
LedgerJournalTransData jourTransData;
LedgerJournalStatic jourStatic;
DimensionDynamicAccount ledgerDim;
DimensionDynamicAccount offsetLedgerDim;
ttsBegin;
ledgerDim = DimensionStorage::getDynamicAccount(
'1002',
LedgerJournalACType::Vend);
offsetLedgerDim = DimensionStorage::getDynamicAccount(
'USMF OPER',
LedgerJournalACType::Bank);
jourTableData = JournalTableData::newTable(jourTable);
jourTable.JournalNum = jourTableData.nextJournalId();
jourTable.JournalType = LedgerJournalType::Payment;
jourTable.JournalName = 'VendPay';
jourTableData.initFromJournalName(
LedgerJournalName::find(jourTable.JournalName));
jourStatic = jourTableData.journalStatic();
jourTransData = jourStatic.newJournalTransData(
jourTrans,
jourTableData);
jourTransData.initFromJournalTable();
jourTrans.CurrencyCode ='USD';
jourTrans.initValue();
jourTrans.TransDate = systemDateGet();
jourTrans.AccountType = LedgerJournalACType::Vend;
jourTrans.LedgerDimension = ledgerDim;
jourTrans.Txt = 'Vendor payment journal demo';
jourTrans.OffsetAccountType = LedgerJournalACType::Bank;
jourTrans.OffsetLedgerDimension = offsetLedgerDim;
jourTrans.AmountCurDebit = 1000;
jourTransData.create();
jourTable.insert();
ttsCommit;
info(strFmt(
"Journal '%1' has been created", jourTable.JournalNum));
}
{
LedgerJournalTable jourTable;
LedgerJournalTrans jourTrans;
LedgerJournalTableData jourTableData;
LedgerJournalTransData jourTransData;
LedgerJournalStatic jourStatic;
DimensionDynamicAccount ledgerDim;
DimensionDynamicAccount offsetLedgerDim;
ttsBegin;
ledgerDim = DimensionStorage::getDynamicAccount(
'1002',
LedgerJournalACType::Vend);
offsetLedgerDim = DimensionStorage::getDynamicAccount(
'USMF OPER',
LedgerJournalACType::Bank);
jourTableData = JournalTableData::newTable(jourTable);
jourTable.JournalNum = jourTableData.nextJournalId();
jourTable.JournalType = LedgerJournalType::Payment;
jourTable.JournalName = 'VendPay';
jourTableData.initFromJournalName(
LedgerJournalName::find(jourTable.JournalName));
jourStatic = jourTableData.journalStatic();
jourTransData = jourStatic.newJournalTransData(
jourTrans,
jourTableData);
jourTransData.initFromJournalTable();
jourTrans.CurrencyCode ='USD';
jourTrans.initValue();
jourTrans.TransDate = systemDateGet();
jourTrans.AccountType = LedgerJournalACType::Vend;
jourTrans.LedgerDimension = ledgerDim;
jourTrans.Txt = 'Vendor payment journal demo';
jourTrans.OffsetAccountType = LedgerJournalACType::Bank;
jourTrans.OffsetLedgerDimension = offsetLedgerDim;
jourTrans.AmountCurDebit = 1000;
jourTransData.create();
jourTable.insert();
ttsCommit;
info(strFmt(
"Journal '%1' has been created", jourTable.JournalNum));
}
Hi eshant,
ReplyDeletei am not getting the reference to the class LedgerJournalTransData mentioned in your code. Can you please check it.
Hi Manmohan,
DeletePlease check the below link to understand the code
http://daxingwitheshant.blogspot.in/2015/04/creating-payment-journal-using-x-in-ax.html?m=1
Hi Manmohan,
DeletePlease check the below link to understand the code
http://daxingwitheshant.blogspot.in/2015/04/creating-payment-journal-using-x-in-ax.html?m=1
In D365 F AND O Microsoft Update Remove LedgerJournalTransData
Deletethis class and also remove Account and OffsetAccount from Trans Table... and if you try DimensionStorage::getDynamicsAccount method to get LedgerDimension then also you will get the error becouse it is also remove......
you can try this way i tried this and it is working fine in D365
https://d365code.blogspot.com/p/creating-vendor-payment-journal-using-x.html
Enjoy....
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. 소액결제 현금화
ReplyDeletehttps://www.youtube.com/playlist?list=PLWSxgDbjVWTjxvgnaAZ0iK8o5dYHAYhrq
ReplyDeleteCollection of Microsoft ERP Clips || ERP Licensing, Technical, Functional ,Manager Learning Videos Listing
휴대폰 정보이용료 현금화는, 휴대폰의 정보이용료 한도를 이용해서 어플 및 영화 등 모바일 콘텐츠를 결제하여 현금화 하는 것을 정보이용료 현금화라고 합니다. 정보이용료 현금화
ReplyDelete