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

How to show the Advanced search button on ShowJournalView for order history (ShowJournalMode = CustomerSalesOrders)

(0) ShareShare
ReportReport
Posted on by 1,457

On store transactions (ShowJournalView) there is an advanced search button.

When you go to customer detail view on the SearchView on customers, there is a Order history grid panel and above it a link to All orders for that customer.

This link also calls ShowJournalView, except that the mode is  not ShowJournal, but CustomerSalesOrders.

The moment the mode is NOT ShowJournal, the Advanced search button disappears.

If I search for it in Pos.ViewModels.js in RetailSDK, I see there is a "GetAdvancedSearchCriteriaCommand" function that assigns  SetISVisible and SetCanExecute to false. 

Then further down there is a "GetAdvancedSearchCriteriaCommand.prototype.init " that only if the mode is ShowJournal,  change SetIsVisible to true and setCanExecute to true. So this is the reason why the button disappears when called from All orders on the customer details view.

I have a request to add the advanced search on the All orders (ShowJournalMode = CustomerSalesOrders) as well. Any way that I can just make it visible with extensions? I don't really see an extension point for it in "PosApi/Extend/Views/ShowJournalView".

If I can't just change those flags to make it visible and can execute, then by using ShowJournalView.ShowJournalExtensionCommandBase to add a custom button on the appBar, how can I get the customer account number for which the ShowJournalView as called? If one look at the code behind the "All Orders" link on the customer details view, one can see it calls it as follow, so the customer account numbe ris passed in.

var options = {
                customerAccountNumber: this._customerAccountNumber,
                mode: ViewModels.ShowJournalMode.CustomerSalesOrders,
                correlationId: correlationId
                };
Commerce.ViewModelAdapter.navigate("ShowJournalView", options);

I think I need to get a hold of the ViewModel. Then I can get to the options of the viewModel to get to the customerAccountNumber.

Any suggestions on how to accomplish this custom that I need to do, is much appreciated.

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    Hi,

    You can contact Microsoft for help to share your ideas and vote on the Ideas:

    experience.dynamics.com/.../

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 271 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 171 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans