AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 04.03.2015, 19:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Kashperuk Ivan: Walkthrough: Fixing the error message "WorkGroupingId is not found in the map"
Источник: http://kashperuk.blogspot.com/2015/0...r-message.html
==============

Introduction

Since the release of the new Warehouse management solution with Microsoft Dynamics AX 2012 R3, a number of people have reported a sporadic error that was difficult to reproduce, but it was happening consistently on their environments.

The error message shown to the user on the mobile device was also not very helpful:
The value "WorkGroupingId" is not found in the map.
The challenge for us is usually to reproduce the problem, so we can actually debug through the code and see the root cause. We have finally managed to reproduce the problem recently, and have produced a simple fix, that will prevent people from getting into this situation in the future.
I don't yet know if this will be released as a hotfix for 6.3, but I will make sure to update this post with the link if that happens.

You can also just get the code from this post below, but that means you will need to apply it yourself.

But the primary purpose of this blog post is to release a small job to update the data that was messed up. Since we will not update all consumers of the mobile device menu items impacted, but only prevent future setup like that.

Of course, please have your development team review the job and the fix before applying this on your environment, and make sure to run it on your test environment first.
Neither Microsoft nor I will be held accountable for any data loss you might experience as a result of incorrectly applying the fix.
Example of scenario that is broken

I have a purchase order for one of my vendors, for 1 item that is WHS-enabled, as shown below:


Simple purchase orderI now want to use the mobile device to receiving this purchase order in my WHS-enabled warehouse 42. That assumes that I have Location directives, Work templates, Work users, etc. set up already. If you are not familiar with the inbound flow in Warehouse management, please look at some my other posts, where this is described. For this post, I only will include the configuration screen for the Mobile device menu items.
In my company, we used to normally receive small inbound orders, so we configured the mobile device to allow first grouping multiple incoming orders to put them away all at once, and then grouping the puts into one once you are at the location (assuming, of course, that the put-away location is the same for multiple orders). The following menu item configuration corresponds to that:


Mobile device menu items - User groupingBut then, since we got more and more deliveries that were much larger in size, where grouping them for put away on one pallet was no longer an option, we decided to change the menu item setup to just order by order, as shown below:


Mobile device menu items - User directed

But suddenly, when processing putaway for incoming orders, our workers started getting the above error about "WorkGroupingID not found in map":


Warehouse mobile device portal flowProduct bug fix

The fix, as I mentioned above, will only address the part, that touches the configuration of the mobile device menu items, as that is where the root cause of the issue is. When you change the "Directed By" to something other than "User grouping" or "System grouping", the "Group putaway" gets hidden, but still contains the value it had before. Then the mobile device code relies only on this value (in some flows), and does not check that the "Directed by" is also appropriate.


Here's the fix. I am inserting it as an image so it's more difficult to copy to make sure you don't overwrite whatever changes you have in that method already.


Code changes required to fix "WorkGroupingId" bugData fix

The above fix means that people who have invalid setup will still be hitting the exact same issue when doing putaway. So below is a small job that fixes the invalid data by unchecking the "Group putaway" check-box for menu items where it was set incorrectly.


static void dataFix_WHSRFMenuItemTable_WorkGroupId(Args _args)
{
WHSRFMenuItemTable menuItemTable;

ttsBegin;

update_recordSet menuItemTable
setting GroupPutaway = NoYes::No
where menuItemTable.MenuItemDirectedBy != WHSMenuItemDirectedBy::SystemGrouping
&& menuItemTable.MenuItemDirectedBy != WHSMenuItemDirectedBy::UserGrouping
&& menuItemTable.GroupPutaway == NoYes::Yes;

ttsCommit;

info(strfmt('Fixed %1 menu item(s).', menuItemTable.RowCount()));
}


When you run the above job, you'll at the end get an infolog message informing you how many records were fixed.

Result


After applying the above fix and running the above data fix job, you should be able to successfully complete the putaway.






Источник: http://kashperuk.blogspot.com/2015/0...r-message.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Kashperuk Ivan: Walkthrough: Cancelling put-away work in Microsoft Dynamics AX 2012 R3 Blog bot DAX Blogs 0 12.07.2014 12:11
Kashperuk Ivan: Walkthrough: Fixing error "Incorrect Mobile device display settings..." on the mobile device when trying to sign in Blog bot DAX Blogs 0 10.05.2014 06:30
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
emeadaxsupport: Error message “The value ‘xxx’ is not found in the map” when opening Workflow configuration Blog bot DAX Blogs 0 10.02.2010 00:07
Kashperuk Ivan: A not-so-easy game about Earth Blog bot Курилка 8 07.02.2008 16:04
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 02:57.