Hi Anand,
Me also receive same error when want to post FA Acquisition using x++
please refer below my code…need someone help
for(ConCntFA=1;ConCntFA<=conLen(ConFACode);ConCntFA++)
{
//To get Asset id.
strFACode = conPeek(ConFACode,ConCntFA);
tblJournalTrans.Voucher = NumberSeq::newGetNumFromCode(NumberSequenceTable::find(AssetGroup::find(AssetTable::find(strFACode).AssetGroup).AutoNumberSequenceTable).NumberSequence).num();
tblJournalTrans.JournalNum = strJournalID;
tblJournalTrans.CurrencyCode = Ledger::accountingCurrency(CompanyInfo::current());
tblJournalTrans.ExchRate = Currency::exchRate(tblJournalTrans.CurrencyCode);
tblJournalTrans.AccountType = LedgerJournalACType::FixedAssets;
tblJournalTrans.PostingProfile = LedgerJournalName::find(strJournalID).JournalName;
tblJournalTrans.AccountType = LedgerJournalACType::FixedAssets;
tblJournalTrans.OffsetAccountType = enuOffsetAccType;
tblJournalTrans.LineNum = ConCntFA;
tblJournalTrans.TransDate = systemDateGet();
tblJournalTrans.TransactionType = LedgerTransType::FixedAssets;
tblJournalTrans.CurrencyCode = Ledger::accountingCurrency(CompanyInfo::current());
tblJournalTrans.ExchRate = 100;
tblJournalTrans.AmountCurCredit = (AssetTable::find(strFACode).Quantity);
tblJournalTrans.AcknowledgementDate = systemDateGet();
tblJournalTrans.Txt = LedgerJournalName::find(strJournalID).JournalName;
tblJournalTrans.Approved = NoYes::Yes;
tblJournalTrans.Approver = 22565423234; //krishna
intRecId = AssetLedgerAccounts::findAssetLedgerDimension(strFACode,
tblAssetTrans.BookId,
AssetTransType::Acquisition,
true,strPostingProfile);
tblJournalTrans.OffsetLedgerDimension = intRecId;
clsledgerJournalPostCheckPost = LedgerJournalCheckPost::newLedgerJournalTable(LedgerJournalTable::find(strJournalID),NoYes::Yes);
clsledgerJournalPostCheckPost.run();
}