microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
786 stars 621 forks source link

[Procedure Request] Codeunit 7322 Create Inventory Pick/Movement #26977

Closed 365cycle closed 3 weeks ago

365cycle commented 3 months ago

Describe the request

Please add a procedure GetWhseActivHeader(var WhseActivHeader: Record "Warehouse Activity Header") to Codeunit 7322 Create Inventory Pick/Movement.

Also, a procedure to SetHideDialog would be a nice to have (there is a workaround, but it's not very beautiful).

image

image

Additional context

We are currently converting some add-on code from C/Side to BC24. In Codeunit 7322, we added a procedure called CreateInvtMvmtWithoutSourceHideDlg that allowed us to switch HideDialog to true and then call standard procedure CreateInvtMvmtWithoutSource , after which we could return the global var Warehouse Activity Header record to the multiple procedures from which it was called. The original code in CreateInvtMvmtWithoutSource does not allow us to access the Warehouse Activity Header, so we cannot get this code extension ready now.

As far as I could find, there is no way to get access to those global vars in cu 7322, so we'd like to see a procedure that allows us to pick up the new Warehouse Activity Header (and of course to hide the dialogs).

Suggestions could be:

  1. SetWhseActivityHeader Add an overload to SetWhseActivHeader. Parameters should be:

    • Warehouse Activity Header, but passed ByVar (doing this in the standard function is potentially a breaking change, hence the overload). This way we can call the function and use the returned record;
    • HideDialog (which can then be used to set HideDialog to true)
  2. GetWhseActivityHeader & SetHideDialog

    • We can also use a GetWhseActivityHeader procedure, which should then simple assign the global CurrWarehouseActivityHeader record to the ByVar parameter Warehouse Activity Header;
    • Alongside this, we'd like to see a SetHideDialog procedure with which we can switch off the GUI. Internal work item: AB#544502
365cycle commented 2 months ago

Thanks for already creating a work item! Is it possible to predict anything about if and when this will be picked up, and what the solution would look like? This object is a blocker in our upgrade from BC14 to BC24.

ChethanT commented 1 month ago

When you have GetWhseActivityHeader method why do you need SetWhseActivityHeader with WarehouseActivityHeader as var? Isn't GetWhseActivityHeader and SetHideDialog enough for your need?

365cycle commented 1 month ago

Thanks for responding. I don't need both, I just suggested 2 ways to solve the issue. So yes, GetWhseActivityHeader + SetHideDialog would work.

365cycle commented 1 month ago

Sorry for pushing this subject again, but has any decision been taken in this story? If so, can you please add it here? Then at least we can prepare the cu for our go live.

JesperSchulz commented 3 weeks ago

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 24752.