Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
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... 291,280 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?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans