SalesforceLabs / EnhancedLightningGrid

Component that allows you to sort and filter data within the Lightning Experience. Use as a replacement for a Related List, or create a new grid that shows results from a custom query.
BSD 3-Clause "New" or "Revised" License
136 stars 97 forks source link

Adding $User data to a Query not working #5

Open MDalt opened 6 years ago

MDalt commented 6 years ago

Hope this is the right place to post this and apologies if its not. The challenge I am having revolves around querying data based on a current logged in User.

I essentially need data from the login in users record in order to execute the return of the correct records within the data grid.

I have tried $User.xyz , User.xyz , $UserInfo.getxyz , and others but getting "Unable to Query..." in the debug logs.

c.GetSDGInitialLoad response: {"SDGObject":null,"Results":null,"isError":true,"ErrorMessage":"Unable to query: SELECT Name,Billing_Customerr.Name FROM Servicec WHERE Billing_Customerc = $User.PartnerUserAccountIdc ORDER BY Id ASC NULLS FIRST limit 100 offset 0"}

MDalt commented 6 years ago

I have actually managed to negate the need for this by using standard sharing rules and OWD's. I have just done a blanket query with SDG.

However, this would solve the issue of complex sharing rules in many ways within communities and the overhead that comes with them.