Skip to main content

Notifications

Microsoft Dynamics AX forum
Answered

i want to changed inventory dimension ( status ) for on hand item this status is blocked status

Posted on by 46
i want to changed inventory dimension ( status ) for on hand item this status is blocked status cannot do this transaction using transfer journal
 
there is a standard job can do it Warehouse management > Periodic tasks > Inventory status change. 
but i can't make a class to simulate same behaviour : (
 
so how can i do it using X++ there are any class will help me to reach my requirements or anyone can help me to use the standard class to reach my goal ? thanks in advance
 
 
  • Verified answer
    OmarAbdlhamed Profile Picture
    OmarAbdlhamed 46 on at
    i want to changed inventory dimension ( status ) for on hand item this status is blocked status
    Hi Andre,
     
    thanks for your reply, 
     
    the requirement was to use the same process but using code, but i just noticed this class has two parm methods are useful one for the query and the second for the status
    and i tired the code below and it works as standard periodic job screen
     
    WhsInventoryStatusConvert WhsInventoryStatusConvert = new WhsInventoryStatusConvert();
            query   query = new Query(queryStr(WHSInventStatusChange));
            QueryBuildRange qbr,qbr2,qb3 ;
            
            qbr = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(InventSum)), fieldNum(InventSum, ItemId));
            qbr.value(queryValue("00257646"));
            //
            qbr2 = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(InventDim)), fieldNum(InventDim, InventLocationId));
            qbr2.value(queryValue("110"));
            qb3 = SysQuery::findOrCreateRange(query.dataSourceTable(tableNum(InventDim)), fieldNum(InventDim, WMSLocationId));
            qb3.value(queryValue("01-001-20"));
            WhsInventoryStatusConvert.parmQuery(query);
            WhsInventoryStatusConvert.parmToStatus("Damaged");
          //  WhsInventoryStatusConvert.parmInBatch(false);
                WhsInventoryStatusConvert.run();
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,115 Super User 2024 Season 2 on at
    i want to changed inventory dimension ( status ) for on hand item this status is blocked status
    Hi Omar,
     
    What is the exact business process for where you need this? Why can't you use or call the standard periodic job for the status change?

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,969 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans