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 :
Microsoft Dynamics AX (Archived)

streamlining the MPOS order process

(0) ShareShare
ReportReport
Posted on by

My customer would like to remove some screens in the MPOS order process.

Firstly, "Create Customer Order" should be defaulted as soon as a customer is added, I've already figured that out, I modified the addCustomerToCart function in SearchView.ts and call this.cartViewModel.createCustomerOrder() before navigating back to the order screen.

Now I'd like to bypass the screen where you are required to "Pick a store" and "Enter a pickup date", I want to use the current store only and default to todays date.  I've played around a bit with the functions in PickupInStoreView.ts to try and bypass all together but I'm struggling a bit.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Andreas Hofmann Profile Picture
    on at

    When you step through the code in the debugger, you should be able to find the location where the "Pick a store" and "Enter a pickup date" dialog/navigation occurs. Then just replace the data that are being supplied by these activities with your fixed values.  I also suggest you just "unhook" the current UI flow but do not remove it, in case you change you mind or requirements change later.

  • Verified answer
    DanAx Profile Picture
    on at

    Thanks for the great advice Andreas, I accomplished my goal by commenting out the line that navigates to the view that I want to bypass in CartView.ts.  I then added the code from that view that saves the values.

    case Operations.operationTypeEnum.PickupSelected:
    case Operations.operationTypeEnum.PickupAll:
    //bypass the select store and delivery date screens by copying the setPickupInStoreDeliveryAsync call from PickUpInStoreView.ts to this location.
    // Removed ootb code
    //this.navigateToPickupMethodsView(selectedCartLines);   
    // Removed ootb code
    
    var selectedStore: Model.Entities.OrgUnit = ApplicationContext.Instance.availableStores.getItem(Commerce.ApplicationContext.Instance.storeInformation.OrgUnitNumber);
    var shippingAddress: Model.Entities.Address = ObjectExtensions.isNullOrUndefined(selectedStore)
        ? new Model.Entities.AddressClass()
        : selectedStore.OrgUnitAddress;
    
    this.deliveryViewModel.setPickupInStoreDeliveryAsync(
        this.cartViewModel.cart(),
        selectedCartLines,
        Commerce.ApplicationContext.Instance.storeInformation.OrgUnitNumber,
        DateExtensions.getDate(),
        shippingAddress)
        .done(() => {
            Commerce.ViewModelAdapter.navigate("CartView", <ICartViewControllerOptions>{ transactionDetailViewMode: Commerce.ViewControllers.CartViewTransactionDetailViewMode.Delivery });
        })
        .fail((errors: Model.Entities.Error[]) => {
            this.controlErrorCallbackShowErrors(errors);
        });
    break;
    


  • Community Member Profile Picture
    on at

    Hello daniel,

    I have the same request from my customer, however, I was checking the files of the SDK (version 10.0.16 update 40) and I could not find the PickUpInStoreView.ts file, do you know where it is?

    Thank you for your help.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans