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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

D365 How to Pass Variables/Parameters in Views Based on Logged in User GUID

(0) ShareShare
ReportReport
Posted on by 25

Hello Experts,

Hope You are doing well.
I have a situation where i have to filter all product inventory by warehouse of logged in user warehouses of users in his teams as well. Here one user can be in many teams.

My View has an existing warehouse column to filter.
I made a query in Fetch XML Builder in which i have to link entities many times like:

Product Inventory => warehouse => bookableresource => user=> teammember ship => teams ===> and goes on
and also i tried other approaches like  Owner equals Current User or User's Teams etc. but it does not work very well.


Then i created another separate XML query to get warehouses of logged in user plus warehouses of user in his teams which shows promising results but now, i am not sure how to pass this result data in the main View for filter.
Is there any way to filter out data using Parameters in Views ?
 
 MAIN System View Fetch-XML Code: 

  
    
    
    
    
    
    
    
    
    
    
    
      
    
    
  

My Query to Get WareHouses of Current User and Users in His Team's Warehouses:


  
    
      
    
    
      
        
        
          
        
        
          
        
        
          
            
              
              
                
              
            
          
        
      
    
  


Thanks.

  • cloflyMao Profile Picture
    25,210 on at

    Hi Sardar,

    Try View Designer plugin of XrmToolBox to apply your query to a custom view:

    https://stoneridgesoftware.com/going-beyond-advanced-find-views-and-xrmtoolbox-view-designer-fetchxml-builder/

  • Sardar Haseeb Profile Picture
    25 on at

    Hi Clofly,

    i did use this tool before for my other Views but here i need to pass some variables/parameters in order to get results.

    I am searching a way in which one fetch xml result will be the input parameters of other view.

  • cloflyMao Profile Picture
    25,210 on at

    Hi Sardar,

    It would be difficult to pass result of a fetchxml as parameter to the OOB view control, because only one fetchxml can be applied to the view by default.

    As far as I know, the OOB view control only accept some simple parameters, e.g: My active xxx records.

    You could build a custom PCF control and replace the default control with it to support complex query.

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 July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 42

#2
11manish Profile Picture

11manish 19 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 19

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans