Hello,
I have a query how i can get offset ledger dimension by Employee Id for example if i have employee ID : 00001 then how i can get its dimension so that i can insert it in ledgerjournaltrans.offsetLedgerDimension
Hello,
I have a query how i can get offset ledger dimension by Employee Id for example if i have employee ID : 00001 then how i can get its dimension so that i can insert it in ledgerjournaltrans.offsetLedgerDimension
Do you have empl Id as dimension attribute?Can you please elaborate?
DimensionAttributeValueCombination dimensionAttributeValueCombination;
DimensionDynamicAccount ledgerDim;
MainAccountNum mainAccountNum = “5070010014”; //Example Account
MainAccount mainAccount = MainAccount::findByMainAccountId(mainAccountNum);
DimensionServiceProvider DimensionServiceProvider = new DimensionServiceProvider();
LedgerAccountContract LedgerAccountContract = new LedgerAccountContract();
DimensionAttributeValueContract ValueContract;
List ListValueContract = new List(Types::Class);
DimensionStorage dimStorage = DimensionStorage::construct();
LedgerAccountContract.parmMainAccount(mainAccountNum);
// ListValueContract.addEnd(
LedgerAccountContract.parmValues(ListValueContract);
dimStorage = DimensionServiceProvider::buildDimensionStorageForLedgerAccount(LedgerAccountContract);
dimensionAttributeValueCombination = DimensionAttributeValueCombination::find(dimStorage.save());
if (dimensionAttributeValueCombination.RecId)
{
info(strFmt("%1 %2",dimensionAttributeValueCombination.RecId,dimensionAttributeValueCombination.DisplayValue));
}
}
i get an DimensionStorage feom MainAccount . Now how can i get other dimension with employee’s Recid
That doesn’t answers the question. Do you want to build LedgerJournalTrans.offsetLedgerDimension with main account and other dimension attributes. (hoping worker is a dimension attribute)?
Yes i want to build LedgerJournalTrans.offsetLedgerDimension with main account and other dimension attributes.
This can help you,
blogs.msdn.microsoft.com/…/
Hello Salman,
If you want to get it for Vendor, here is the code.
VendAccount accountNum = ‘104’;
int enumValue = LedgerJournalACType::Vend;
info(strFmt("%1",DimensionStorage::getDynamicAccount(accountNum , enumValue)));
Hope by same way you can find out for Employee.
Hi
empDim = phcCreateInvoice.getDimensionValuesEmployees(phcReservationBookingReqDetail.DimensionDefault);
// info(strFmt("%1",empDim));
offsetdim = [‘5070010014’,‘5070010014’,1,‘Employees’,empDim];
ledgerJournalTrans.OffsetLedgerDimension=trans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId(offsetdim));
i get a default dimension value in empDim variable when i add it in Container OffsetDim it show me an error Financial Dimension 000063 does not exist
Thanks Kranthi I have resolved the issue
If the thread is resolved. Make it as verified solution, replies.