Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

How to exposed main account when we have recid ?

(0) ShareShare
ReportReport
Posted on by 516
Hi guys,
 
Need some help on development.
In regards of item and its item posting, I want to check what is the ledger account set for the specific item.
I tried to use this method :
 
 
LedgerDimensionAccount  ledgerDimensionAccount;
InventPosting           inventPosting;
InventPostingItemLedgerDimensionParameters searchParameter;
 
while select inventPosting group by InventAccountType
 {
        searchParameter         =  InventPostingItemLedgerDimensionParameters::newFromParameters(inventPosting.InventAccountType, inventTable.ItemId);
        ledgerDimensionAccount  = InventPosting::itemLedgerDimensionFromParameter(searchParameter);
        .
        .
        .
}
 
I managed to get the ledgerDimensionAccount, but in debug screen, this is just a recid. How to exposed what is the original value (its name)
I figured this ledgerDimensionAccount contain main account, can I say that ?
 
Thanks,
 
  • Ken Manhattan Profile Picture
    Ken Manhattan 516 on at
    How to exposed main account when we have recid ?
    Hi,
     
    Thanks. This is exactly what I needed.
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,836 Most Valuable Professional on at
    How to exposed main account when we have recid ?
    You can get the main account record by LedgerDimensionFacade::getMainAccountFromLedgerDimension().

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans