hi,
I have written a job to display the main account number and financial dimensions value for the vendinvoicetrans table by using two separate jobs, but I want to do this by a single job and I am unable to join these fields.
Please advise.
*This post is locked for comments
I have find out the answer .
static void FinancialdimensionwithMainaccount(Args _args)
{
AccountingDistribution accountingDistribution;
VendInvoiceTrans vendInvoiceTrans;
DimensionAttributeValueCombination dimensionAttributeValueCombination;
MainAccount mainaccount;
DimensionAttributeValueSetItemView dimensionAttributeValueSetItemView;
DimensionAttribute dimensionAttribute;
while select vendInvoiceTrans
join accountingDistribution
where accountingDistribution.SourceDocumentLine == vendInvoiceTrans.SourceDocumentLine
&& vendInvoiceTrans.InvoiceId=='0002-68631' // Provide invoiceid to filter
join dimensionAttributeValueCombination
where dimensionAttributeValueCombination.RecId== AccountingDistribution.LedgerDimension
join MainAccountid from mainaccount
where mainaccount.RecId==dimensionAttributeValueCombination.MainAccount
outer join dimensionAttributeValueSetItemView
where dimensionAttributeValueSetItemView.DimensionAttributeValueSet == vendInvoiceTrans.DefaultDimension
outer join Name from dimensionAttribute
where dimensionAttribute.RecId == dimensionAttributeValueSetItemView.DimensionAttribute
{
info(strfmt("InvoiceId - %1,MainAccount - %2,Dimension - %3,Dimension Value - %4",vendInvoiceTrans.InvoiceId,
mainaccount.MainAccountid,dimensionAttribute.Name,dimensionAttributeValueSetItemView.DisplayValue));
}
}
Hi Jose Mendozaa!
Can you provide more details about your requirements?
Maybe this link will be helpful:
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156