web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How I can get InventDimId or InventLocationId from inventdimprint ?

(0) ShareShare
ReportReport
Posted on by 332

Hello..

How I can get  InventDimId or InventLocationId from inventdimprint column  .

the inventdimprint  exist In report Sales order line  tmp  (SalesLinesExtendedTmp) table.

 pastedimage1593085782530v1.png

In inventory management the warehouse named just 21  , is there and method can take the inventdimprint  and return InventDimId or InventLocationId 

Thanks.

I have the same question (0)
  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Ahmed,

    Value in inventdimprint is a string combination of pairs Inventory dimension label + value and pairs are separated by 3 spaces. So you can just try to parse it with str2con function to container and work with the container to get the needed value. But you will not get original InventDimId value.

    Could you, please, how are you planning to use values extracted from inventdimprint?

  • Ahmed Osama Ibrahim Profile Picture
    332 on at

    Thank you i just need it to sum some qty from other sales orders based on inventlocationid

  • Ahmed Osama Ibrahim Profile Picture
    332 on at

    I think if the user change the language , the result will be wrong right ?

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Ahmed,

    The label "warehouse" is depended on language settings. You can try to use this snippet to parse this value.

    container pairs = str2con(inventDimPrintValue, '   ');
    container warehousePair = str2con(conpeek(pairs, 1), ' : '); //1 is warehouse pair position in inventDimPrintValue
    
    info(conpeek(warehousePair, 2)); //1 is label position, 2 is value position

  • Ahmed Osama Ibrahim Profile Picture
    332 on at

    ara.png

    Can explain why this job return :return colon before 13

    thanks

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Ahmed,

    In str2con function in AX2012 second parameter has length 10 and "Warehouse :" just cut to 10 lenght as well. In this case you need to use str2con_RU where unlimited strings are used as parameters.

    Also if topic is related to AX2012, you can modify report provider class directly and get access to SalesLine.InventDimId to get warehouse value from it (In D365 it's not possible anymore).

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans