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

Sortable Data Grid not showing for Community Users #87

Open AndyHaas opened 1 year ago

AndyHaas commented 1 year ago

I have assigned the permission set to the user, and I have reviewed the profile and validated APEX access. I validated Sharing Rules were set correctly, but the component is not visible to community users. Any other suggestions?

AndyHaas commented 1 year ago

14:53:43.56 (2382633083)|SOQL_EXECUTE_BEGIN|[74]|Aggregations:0|SELECT id FROM sdg_preferencesc WHERE (userc = :tmpVar1 AND sdgKeyc = :tmpVar2) 14:53:43.56 (2387781902)|SOQL_EXECUTE_EXPLAIN|[74]|Index on sortablegridsdg_Preferencesc : [sortablegridUserc], cardinality: 4, sobjectCardinality: 1307, relativeCost 0.031 14:53:43.56 (2387803991)|SOQL_EXECUTE_END|[74]|Rows:1 14:53:43.56 (2388147276)|DML_BEGIN|[77]|Op:Delete|Type:sortablegrid__sdg_Preferencesc|Rows:1 14:53:43.56 (2456149287)|DML_END|[77] 14:53:43.56 (2456517248)|DML_BEGIN|[81]|Op:Insert|Type:sortablegrid__sdg_Preferences__c|Rows:1 14:53:43.56 (2484914387)|DML_END|[81] 14:53:43.56 (2484998690)|ENTERING_MANAGED_PKG|sortablegrid 14:53:43.56 (2487071856)|ENTERING_MANAGED_PKG|sortablegrid 14:53:43.56 (2487368047)|ENTERING_MANAGED_PKG|sortablegrid 14:53:43.56 (2487403418)|ENTERING_MANAGED_PKG|sortablegrid 14:53:43.56 (2488056883)|ENTERING_MANAGED_PKG|sortablegrid 14:53:43.56 (2488145373)|ENTERING_MANAGED_PKG|sortablegrid 14:53:43.56 (2488166352)|ENTERING_MANAGED_PKG|sortablegrid 14:53:43.56 (2488480713)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|"common.apex.runtime.impl.ExecutionException"|0x68514ce1 14:53:43.56 (2488505061)|VARIABLE_ASSIGNMENT|[EXTERNAL]|message|"Script-thrown except (3 more) ..." 14:53:43.56 (2488571235)|VARIABLE_ASSIGNMENT|[EXTERNAL]|cause|"common.apex.runtime.impl.ExecutionException: Argument cannot be null."|0xe9c1968

AndyHaas commented 1 year ago

so after a deep deep dive into figuring out how this component works the issue goes down to the callMethod within the sdgBaseHelper.js class and the action.setCallback(this, function (actionResult) { function

We are getting a state == 'Success' which then gets us a response of 5 17:26:55:701 c.GetSDGInitialLoad response: {"SDGObject":null,"Results":null,"isError":true,"ErrorMessage":"Script-thrown exception"}

So I am not sure what permissions the community user would be missing that a normal user has

The setCallback calls the function GetSDGInitialLoad in the sdgController.cls

justinawhite1980 commented 1 year ago

@AndyHaas I had the same issue. The permission set is assigned to my community users via perm set group. When I added the object perms read and view all and set all fields to read on all of the sortable data grid objects via the profile assigned to all of my community members, the grid showed up fine. Give it a try and see it that renders the grid.

AndyHaas commented 1 year ago

I have validated at a profile level that they have read access to all objects that start with "Sortable". Are there any other objects that I am missing?

@justinawhite1980

AndyHaas commented 1 year ago

Link to Trailhead Discussion https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000LIElXSAX