web
You’re offline. This is a read only version of the page.
close
Skip to main content
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.

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at
    RE: D65 How to Create Dynamic Views Based on Logged in User

    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
    RE: D65 How to Create Dynamic Views Based on Logged in User

    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
    RE: D365 How to Create Dynamic Views Based on Logged in User

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 64

#2
CU29080825-0 Profile Picture

CU29080825-0 16

#2
mk1329 Profile Picture

mk1329 16

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans