web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Is it possible to pass in an itemID to the FulfillmentLineView as a parameter to retrieve the data for

(0) ShareShare
ReportReport
Posted on by 1,457

I need to add a custom app bar button on the InventoryLookupView. That button should call FulfillmentLineView and pass in the itemId of the line the user was on in the InventoryLookupview and only show records in the FulfillmentLineView for that specific itemID.

When I look in PosApi/Extend/Views/FulfillmentLineView I see only the following options available to me and I do not see anything that looks like it accepts a parameter in retrieving the data:

pastedimage1586445215374v1.png

I can create a totally new view that needs to pull the same data as the FulfillmentLineview but then  how do I tell it what its datasource is and I still won't know how to pass in a parameter. 

Any idea or examples are much appreciated.

I have the same question (0)
  • Suggested answer
    Guanghui Profile Picture
    on at

    I suggest that you can check the examples in RetailSDK, for this case, please check the

     export abstract class InventoryLookupExtensionCommandBase extends ExtensionCommandBase<IInventoryLookupToExtensionCommandMessageTypeMap> {

           protected readonly context: IInventoryLookupExtensionCommandContext;

           /**

            * The handler for the product changed message.

            * @remarks Derived classes should set the handler to execute functionality when a "ProductChanged" message is received.

            */

           protected productChangedHandler: (data: InventoryLookupProductChangedData) => void;

           /**

            * The handler for the location selected message.

            * @remarks Derived classes should set the handler to execute functionality when a "LocationSelected" message is received.

            */

           protected locationSelectionHandler: (data: InventoryLookupLocationSelectedData) => void;

           /**

            * The handler for the location selection cleared message.

            * @remarks Derived classes should set the handler to execute functionality when a "LocationSelectionCleared" message is received.

            */

           protected locationSelectionClearedHandler: () => void;

           /**

            * Creates a new instance of the InventoryLookupExtensionCommandBase class.

            * @param {IInventoryLookupExtensionCommandContext} context The command context.

            * @remarks All commands added to the inventory lookup page should derive from this class.

            */

           constructor(context: IInventoryLookupExtensionCommandContext);

       }

       /**

    I think the  protected productChangedHandler: (data: InventoryLookupProductChangedData)  , the interface is :

    type InventoryLookupProductChangedData = {

           product: Proxy.Entities.SimpleProduct;

           locationAvailabilities: Proxy.Entities.OrgUnitAvailability[];

       };

    It contains the product information

    And then I suggest that you can check the  WarrantAndReturn Sample, you can pass this product through click the AppBar Command such as  this code:

    protected execute(): void {

           this.isProcessing = true;

           this.context.navigator.navigate("WarrantyEnabledProductsView", <IWarrantyEnabledProductsViewModelOptions>{

               customer: this._customer,

               products: this._products,

               salesOrder: this._selectedSalesOrder

           });

           this.isProcessing = false;

       }

    And then receive the product in the ViewModel(such as WarrantyEnabledProductsViewModel) of the new view see below:

    constructor(context: IExtensionViewControllerContext, options?: IWarrantyEnabledProductsViewModelOptions) {

           this._context = context;

           this._options = options || { customer: undefined, products: [], salesOrder: undefined };

           this._options.products = this._options.products || [];

           this.title = ko.observable(StringExtensions.format(

               this._context.resources.getString("WarrantyEnabledProductsTitleFormat"), this._options.salesOrder.ReceiptId));

           this.isBusy = ko.observable(false);

           this.warrantyEnabledProducts = ko.observableArray(this.getProductsWithWarranty());

       }

  • Retha Profile Picture
    1,457 on at

    I'm stuck on this one.  Going from the App Bar button to the fulfillment form doesn't look  like I can use the WarrantyEnabledProductsView model example.

    The only code that I can see that is exposed for extension is the FulFillemntLineSearchCriteria and it doesn't have ItemId as a search criteria. So I have to add it as an extension property. Don't know how slow that will make the fulfillmentLinesView page then. It is already slow.

    If I want to create a new view but it must be a copy of the standard FulFillmentLinesView, how do I go about it? It needs to have the same functionality with the filters and sort buttons. Is it possible to use the same built-in triggers and framework ?

    Or do I need to write everything from scratch?

  • Guanghui Profile Picture
    on at

    Have you resolved this issue?

  • Retha Profile Picture
    1,457 on at

    No. FulfillmentLineView doesn't have the hookups to accomplish this. I contacted Microsoft and I have to write everything from scratch.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 298 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 179 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 121 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans