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

Announcements

News and Announcements icon
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,461

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,813 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 118 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 73 Super User 2026 Season 1

#3
Sagar Suman Profile Picture

Sagar Suman 54 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans