tomansley / SimpliListViews

Salesforce List Views App Package
GNU General Public License v3.0
0 stars 0 forks source link

Error Retrieving Object List Views Error as System Administrator #131

Closed dbsfhub closed 1 year ago

dbsfhub commented 2 years ago

Receiving an error on all the examples and unable to create an instance on a Record Page.

 Error Retrieving Object List Views
 No List Views available as the user does not have access to this object.

image

Confirmed that the view are initialized and they do exist and can be seen: image

Checked permissions on package objects: image

Log doesn't give any real direction: image

I feel like I have to be missing something really simple.. the videos are so easy to follow and as an Admin Profile user this appears to just work out of the box.

tomansley commented 2 years ago

Hello,

Thanks for reaching out. Unfortunately I am away on vacation until Thanksgiving so cannot look at what might be the problem. I think you are correct that it's probably something simple. I'll take a look at this as soon as I get back.

Thinking out loud here. Do you have any weird list view names? How many list views got created? I am thinking that there is something specific with one of your list views that I have not taken into account and so it's always failing.

Cheers Tom


From: dbsfhub @.> Sent: Tuesday, November 15, 2022 6:01:30 PM To: tomansley/SimpliListViews @.> Cc: Subscribed @.***> Subject: [tomansley/SimpliListViews] Error Retrieving Object List Views Error as System Administrator (Issue #131)

Receiving an error on all the examples and unable to create an instance on a Record Page.

Error Retrieving Object List Views No List Views available as the user does not have access to this object.

image

Confirmed that the view are initialized and they do exist and can be seen: [image]https://user-images.githubusercontent.com/108283681/201991824-21d16a53-3e1b-49fb-b041-694bf4e53d5d.png

Checked permissions on package objects: [image]https://user-images.githubusercontent.com/108283681/201991895-4b37212e-8e7e-4991-bfec-3feebb5e1313.png

Log doesn't give any real direction: [image]https://user-images.githubusercontent.com/108283681/201992172-c2ad3189-7375-496f-bc43-0db25bbb87d6.png

I feel like I have to be missing something really simple.. the videos are so easy to follow and as an Admin Profile user this appears to just work out of the box.

— Reply to this email directly, view it on GitHubhttps://github.com/tomansley/SimpliListViews/issues/131, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAC3UGPVSULPFQYDENI6FMDWIPFXVANCNFSM6AAAAAASBGXI6I. You are receiving this because you are subscribed to this thread.Message ID: @.***>

dbsfhub commented 2 years ago

Tom,

Appreciate the quick response and enjoy your vacation!

There are 936 List Views in the system currently. I am not seeing something about any of the List View names that jumps out but I will do some additional looking there to see what I can find for anything that looks off. There’s a lot of - , ( , ) and / characters but not sure that meets your definition.

Thanks, Cory

leannewilliams commented 2 years ago

Hi!

I am having the same issue so hopefully once you have had a great time at Thanksgiving you can let us know what we need to do :-)

This is my error, i definitely have access to the object

error Error Retrieving Object List Views There was an error retrieving Opportunity list views data. This usually indicates the user does not have read access to the object. Please see an administrator if you believe this to be an error - Value exceeded maximum size limit (100KB): 125.09 KB, 125.1% of limit.

Ta

Leanne

tomansley commented 2 years ago

Leanne - your error message is enlightening! It suggests to me that the number of opportunity list views that exist in your org is large. Do you have groups set up on opportunities? If so then for each group created an associated list view is created. You can determine the number of list views specifically for opportunities by running the following query -

SELECT count() FROM simpli_lvList_View__c WHERE simpli_lvObject_Name__c = 'Opportunity'

If the value comes back in the hundreds or thousands then to remove some of the list views you need to go into the 'Simpli List Views Admin' app and click on the 'List Views Admin' tab. Then scroll down to 'Excluded List Views' and update that to remove some list views from the list. Then refresh the list views. Once refreshed hopefully you will be able to access the list views.

Let me know how it goes!

tomansley commented 2 years ago

dbsfhub - looking at the code for this error it suggests that 0 list views are being found for the Account object. If you run the following query what is the count returned?

SELECT count() FROM simpli_lvList_View__c WHERE simpli_lvObject_Name__c = 'Account'

If 0 are returned then for some reason the Account list views were not found when initializing. If more than 0 are returned then we need to look elsewhere!

dbsfhub commented 2 years ago

The query returns 19 rows.

CJ

tomansley commented 2 years ago

Ok.

Does this happen with only the Account object or any object that is selected?

Have you checked that all profile permissions are set appropriately? (although from your above debugging it looks like you should be sys admin) - See here - https://github.com/tomansley/SimpliListViews/wiki/FAQ#what-are-the-profile-security-settings-i-should-use-for-my-users-1

To dig into debugging a bit further. When on the SLV page in Salesforce, right click anywhere in the page and select "Inspect" (this is assuming you are using a Chromium or Firefox browser). A sidebar should open on the side or bottom of the page. Select the "Console" tab. This displays all debugging info for the client page. Refresh the SLV page and allow it to load. Just before selecting "Account" from the object list on the page CLEAR the web console output.

Now select "Account". It should create some debugging logs such as -

Object list view retrieval successful for Example_1_All_List_View Object list view size - 21 for Example_1_All_List_View Pinned list view - simpli_lv__Platinum_and_Gold_Split_View for Example_1_All_List_View First List View Get - false for Example_1_All_List_View Spinner OFF - getListViewsForObject - Example_1_All_List_View

What logs are you getting?

dbsfhub commented 2 years ago

First off, really appreciate the help here!

This occurs with any object that I select. I tried a number of them thinking it was just a specific object issue.

Correct that I am in the Sys Admin Profile. I also had created a Permission Set using the reference you linked to in advance of user testing so tried applying that to my user manually with no change.

Console Debug: Spinner ON - handleObjectChange - Example_1_All_List_View simpliUIListViews.js:1 Object selected - Account for Example_1_All_List_View simpliUIListViews.js:1 Example_1_All_List_View CALLOUT - getObjectListViews(Account) - 6 simpliUIListViews.js:1 Starting simpliUIListViews.renderedCallback for Example_1_All_List_View simpliUIListViews.js:1 Record id - undefined simpliUIListViews.js:1 No page initialization needed for Example_1_All_List_View simpliUIListViews.js:1 Finished renderedCallback for Example_1_All_List_View simpliUIListViews.js:1 Starting simpliUIListViews.renderedCallback for Example_1_All_List_View simpliUIListViews.js:1 Record id - undefined simpliUIListViews.js:1 No page initialization needed for Example_1_All_List_View simpliUIListViews.js:1 Finished renderedCallback for Example_1_All_List_View simpliUIListViews.js:1 Popover set for hiding - Example_1_All_List_View simpliUIListViews.js:1 Starting simpliUIListViews.renderedCallback for Example_1_All_List_View simpliUIListViews.js:1 Record id - undefined simpliUIListViews.js:1 No page initialization needed for Example_1_All_List_View simpliUIListViews.js:1 Finished renderedCallback for Example_1_All_List_View simpliUIListViews.js:1 Object list view retrieval successful for Example_1_All_List_View simpliUIListViews.js:1 Object list view size - 0 for Example_1_All_List_View simpliUIListViews.js:1 Pinned list view - undefined for Example_1_All_List_View simpliUIListViews.js:1 First List View Get - true for Example_1_All_List_View simpliUIListViews.js:1 Spinner OFF - getListViewsForObject - Example_1_All_List_View simpliUIListViews.js:1 Starting simpliUIListViews.renderedCallback for Example_1_All_List_View simpliUIListViews.js:1 Record id - undefined simpliUIListViews.js:1 No page initialization needed for Example_1_All_List_View simpliUIListViews.js:1 Finished renderedCallback for Example_1_All_List_View (2)simpliUIListViews.js:1 Popover set for hiding - Example_1_All_List_View

CJ

tomansley commented 2 years ago

No worries at all!

This is telling me that the page is returning 0 list views -

Object list view size - 0 for Example_1_All_List_View

and this is telling me that nothing failed whilst trying to retrieve the list views -

Object list view retrieval successful for Example_1_All_List_View

So that is odd.

The code uses the cache for these list views as they change very infrequently. Could you try to reset the cache? I believe you should be able to do this by going to Setup -> Platform Cache. Click on SimpliListViewsCache and then click the Clear Cache button. I am not holding up much hope for this but everything is worth a try! After that refresh the SLV page and retest.

If cache refresh doesn't work then we need to go back to the debugging logs which you have already turned on and tried. After turning the debugging logs on refresh the SLV page. Then go to the "List View Logs" tab and delete all the logs (we do this to ensure we are not mixing up these logs with others). Once deleted go back to the SLV page and select Account from the list. You should get the error message. Go back to the "List View Logs" tab and refresh. You should see more logs. Firstly, does anything look wrong or does something look like its failed? If so send it over. If not then lets start by looking at the one that is similar to the log you sent above but which should say

Call Id - getListViewsByObject(Account)

You can send the logs to my email if it makes more sense - tom@ansleyllc.com

dbsfhub commented 2 years ago

I was able to reset the cache but no change in behavior.

I enabled debugging logs and got the following when I refreshed the 'Everything Example' tab. After clearing these two and selecting Account there were no new logs created. image

I repeated the steps using the 'List Views Example' tab and got the following entries but received the same error. image

tomansley commented 2 years ago

Ok, my bad. Before you select "Account" on the SLV page you will need to clear the cache.

There will definitely be logging to look at.

dbsfhub commented 2 years ago

I got an extra log this time: image

tomansley commented 2 years ago

Thats weird. The object is showing as "ZAccount".

Does that mean anything to you?

dbsfhub commented 2 years ago

I saw that and no.. we are using the standard object and I am unable to locate any object with that name or API name in the system.

I tried the Contact object and same thing:

----- List View Visibility Matrix ----- Call Id - getListViewsByObject(ZContact)

tomansley commented 2 years ago

Ok, if you go into the SLV Admin app and then go to the List View Configs tab. Look for the "All:All" config

image

Click on it to open the record. Go to the related lists and in the Config Parameters look for "List View Objects"

image

What do you have as a value in that field. It will probably be a fairly long string!

dbsfhub commented 2 years ago

I just sent the string to you directly at the email you provided previously.

CJ

tomansley commented 2 years ago

This is going to sound crazy...but does the user Id that you are using end with a "Z"?

So for my org my user Id = 0053h000000xrj3

If it does I know what the problem is and will need to put a fix in for you.

dbsfhub commented 2 years ago

Unfortunately, no.. 005j000000C1vNQ

tomansley commented 2 years ago

Try the package I sent anyway. I think I am looking at the 18 char Id.


From: dbsfhub @.> Sent: Tuesday, November 29, 2022 4:44:36 PM To: tomansley/SimpliListViews @.> Cc: tomansley @.>; Comment @.> Subject: Re: [tomansley/SimpliListViews] Error Retrieving Object List Views Error as System Administrator (Issue #131)

Unfortunately, no.. 005j000000C1vNQ

— Reply to this email directly, view it on GitHubhttps://github.com/tomansley/SimpliListViews/issues/131#issuecomment-1331414427, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAC3UGKEATJORGREJV5MQTTWK2BNJANCNFSM6AAAAAASBGXI6I. You are receiving this because you commented.Message ID: @.***>

dbsfhub commented 2 years ago

I actually did go ahead and install it since I figured it couldn't hurt and it's now loading the drop-downs and I am able to select and see results. Something in that update seems to have done it because I am trying many objects with success now. The Log of course now shows the results of the views it found for my user.

tomansley commented 2 years ago

Great. I will go ahead and mark this bug ready for release.

Thanks for the patience and help.....especially when we manage to find a crazy bug like this!

dbsfhub commented 2 years ago

Thank you so much for the help. I am excited to get to trying out some solutions with this tool now! :)

tomansley commented 1 year ago

This issue has been resolved and will be available in the next release.

tomansley commented 1 year ago

Released in v2.147