Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Filter Dropdown of Opps based on parentaccountid in Custom Page Dialog

(1) ShareShare
ReportReport
Posted on by 4
I am trying to Filter a dropdown within my Custom Page. In the end something like this has to be achieved:
 
-> User clicks on Ribbon Bar button in Dynamics on a contact
-> Account ID is retrieved via JS and given to Custom Page via "navigateTo" (varRecordId in Power FX)
-> Custom Page Opens in a Dialog
-> Only Opportunities of the given account can be selected by User
-> Some Business Logic on Button Click
 
Does someone have an Idea how to Filter the Dropdown correctly in Power FX? I tried almost everything but I am not able to make it work: 
 
 
 
 
 
  • Suggested answer
    Muhammad Shahzad Shafique Profile Picture
    843 Most Valuable Professional on at
    Filter Dropdown of Opps based on parentaccountid in Custom Page Dialog
    1. Pass Account ID via navigateTo:
     
    Xrm.Navigation.navigateTo({
      pageType: "custom",
      name: "your_custom_page_name",
      parameters: {
        varRecordId: accountId // retrieved from the contact form
      }
    }, {
      target: 2, // Dialog
      width: { value: 50, unit: "%" },
      height: { value: 70, unit: "%" },
      position: 1
    });
    
    2. In the OnStart property of the Custom Page:
    Set(accountId, Param("varRecordId"))
    
    3. Assuming the dropdown is bound to the Opportunities table:

    Filter(Opportunities, Account.Id = accountId)
  • Suggested answer
    CU01071522-0 Profile Picture
    4 on at
    Filter Dropdown of Opps based on parentaccountid in Custom Page Dialog
    Isses was not related to the filter criteria...the attributes for display within in the dropdown had to be adjusted. As soon as the topic was selected there, the desired opportunities are shown. 

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Holly Huffman Profile Picture

Holly Huffman 103

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 96 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 51 Most Valuable Professional

Product updates

Dynamics 365 release plans