[Function expose] Codeunit 7307 Whse.-Activity-Register Code
In Codeunit 7307 Whse.-Activity-Register the functions LocationGet and GetItemUnitOfMeasure2 (why 2? where's the original?) would have to be global and external and return via VAR the getted Location/ItemUnitOfMeasure (so you can get rid of the global variables).
LOCAL LocationGet(LocationCode : Code[10])
IF LocationCode = '' THEN
CLEAR(Location)
ELSE
IF Location.Code <> LocationCode THEN
Location.GET(LocationCode);
LOCAL GetItemUnitOfMeasure2(ItemNo : Code[20];UOMCode : Code[10])
IF (ItemUnitOfMeasure."Item No." <> ItemNo) OR
(ItemUnitOfMeasure.Code <> UOMCode)
THEN
IF NOT ItemUnitOfMeasure.GET(ItemNo,UOMCode) THEN
ItemUnitOfMeasure.INIT;
The function UpdateWhseShptLine should be global + external and the variable WhseShptLine should be a local (instead of a global).
TY
This one somehow fell through the cracks! Sorry about that! I will create the appropiate work item and we'll get back to you with our findings.
Can happen :) TY
Hi,
The functions LocationGet and GetItemUnitOfMeasure have been made external previously in August and you should be able to view it in the preview. There was no specific reason for why the GetItemUnitOfMeasure had 2 at the end of the method and that has since been removed.
What is the reason you require UpdateWhseShptLine to be external?
Ah thank you :)
What is the reason you require UpdateWhseShptLine to be external?
(Had to check again)
When exploding a BOM-item on saleslines, we don't change the the BOM-item to a textline.
When the components get picked, we need to know if everything is picked for the BOM-item.
We changed the Code function in COD7307 to handle this.
Now in order to have the same functionality with events, we have to duplicate the functions LocationGet, GetItemUnitOfMeasure2 and UpdateWhseShptLine in our subscriber codeunit (with no changed logic).
When these functions becomes global and external, we can just call them from our subscriber.
Thanks
Thanks for the reply.
We've gone ahead with your request to make UpdateWhseShptLine external. We usually include these types of changes in the next minor release, so look for it there.