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 :
Power Platform Community / Forums / Power Apps / Pass CustomFilter when...
Power Apps
Answered

Pass CustomFilter when using Xrm.Navigation.navigateTo

(0) ShareShare
ReportReport
Posted on by 19

Hi All,

 

I'm using the Xrm.Navigation.navigateTo() method to launch the connection entity main form from a button.

I'm passing values into the connection form to populate the Connected From field.

I would also like to apply the addCustomFilter() method on the Role (To) field, this is where I'm getting stuck!

 

Does anyone know if this is possible or have any alternative ideas to interact with the form once loaded?

Thanks in advance.

I have the same question (0)
  • João Santos Profile Picture
    323 on at

    Hi,

    It's been sometime since I've used the Connection entity but you should be able to add a custom library with an onload event that then applies the addCustomFilter() to the To field.

    I could be wrong, the connection form used to be very limited in the level of customisation you could do with it but I do believe it behaves like any other form right now:

    joaodsantos_0-1668508012056.png

     

  • JasonMcAndrew Profile Picture
    19 on at

    Hi Joaodsantos,

     

    Thank you for your response, indeed you are correct about the onload event. However, I've not explained myself fully.

     

    My Scenario,

    I'm launching the connection form from a grid on the account form.

    The grid is filtered to display connections where the role is of type 'Partnership'.

    When the connection form is launched i wish to filter 'Role To' to display only Partnership roles.

    I only want this filter to apply when triggered from the partnership grid and not for every connection hence why i want to pass through the filter from the navigateTo() method and not onload of the connection form.

     

    Thanks

    Jason

     

  • Verified answer
    João Santos Profile Picture
    323 on at

    Ah, that explains the requirement a bit more, thanks for the context.

    But still, I'm not sure you're able to pass that as a parameter to the form.

    "Thinking out loud", I can see two ways of implementing that.

    Have a hidden field that you pass as a parameter from the grid, maybe a two options called ispartnership. And if that is true on the onload you applied the addCustomFilter.

    Other way is to probably create a separate form on the connections where you have the onload function running every time and you use that form id on the navigateTo() function. So the default entity form is still the same but you have this specific form for partnership connections from that grid.

     

    also, if you are setting the connection role, maybe you can use that to decide onload if you should use the addCustomFilter or not? Not sure how that part is being done so not sure if this would work.

     

    hope this helps

  • JasonMcAndrew Profile Picture
    19 on at

    Thank you for your suggestions Joao, i really appreciate it.

     

    I discovered that category is a global choice so i decided to go with creating a new choice for category in the connection entity. I can now set the value of the category using navigateTo() and use that value in my OnLoad function to set the filter. It's working perfectly!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 516

#2
Vish WR Profile Picture

Vish WR 444

#3
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

Last 30 days Overall leaderboard