Apex Error #177
-
Hi I am receiving the below error when I am logged into one of my User's accounts but not when I am logged into my System Admin Account - is this a known issue? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 1 reply
-
Hi @JaimeInfutor. We haven't come across this error before. Would you be able to share the metadata used for the parent object in question? The more info you can share the better in order for us to replicate the issue. The timeline_config__mdt would be helpful with the details for each record in terms of the fields being used. Would that be possible for you to share? If you can't share details then you can try to inactivate Tasks and Events to see if that resolves the error. I have seen cases in the past for people with large numbers of Objects in one Org that they can get issues when they have more than 1,000 objects that can be related to Tasks or Events. You can verify this if you navigate to any Task - then look in the 'Related To' field to see how many Objects are present. Could it be possible you have > 1,000? <= You can verify the difference for this user and sys admin too. |
Beta Was this translation helpful? Give feedback.
-
Hi Dave
Appreciate the reply!
Absolutely I'd be more than happy to share this - would you mind providing
instructions on how I can get this info to you?
Thanks
…On Wed, Mar 23, 2022 at 11:21 PM Dave Norris ***@***.***> wrote:
Hi @JaimeInfutor <https://github.com/JaimeInfutor>. We haven't come
across this error before. Would you be able to share the metadata used for
the parent object in question? The more info you can share the better in
order for us to replicate the issue. The timeline_config__mdt would be
helpful with the details for each record in terms of the fields being used.
Would that be possible for you to share?
—
Reply to this email directly, view it on GitHub
<#177 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMDVR5AWDDZNM2NNDIOA6LVBPUTZANCNFSM5ROWZ3LQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hello!
Thank you for the feedback
Here is a screenshot of my results
[image: Screen Shot 2022-03-30 at 10.20.20 AM.png]
…On Sun, Mar 27, 2022 at 6:17 AM Dave Norris ***@***.***> wrote:
1. To find how many objects you have 'Allowed Activites' on.
Open the developer console. When logged in as an admin go to the cog in
the top right and select dev console
[image: image]
<https://user-images.githubusercontent.com/7021883/160278713-a8c389bb-7154-45ba-ac0d-d91146ab149a.png>
This will open the developer console dialog. In the dialog select Debug ->
Open Execute Anonymous Window
[image: image]
<https://user-images.githubusercontent.com/7021883/160278754-6ff7903d-1d9b-4b22-85c3-505c35b97d94.png>
In the window that opens paste in the following code. This code loops
through all the objects to see which ones appear in the WhatId relationship
in the Task object and outputs the final count to the debug log.
Set<Schema.SObjectType> objectsWithActivitiesEnabled = new Set<Schema.SObjectType>();
String objectNames = '';
Integer count = 0;
for (Schema.SObjectType objectType : Task.WhatId.getDescribe().getReferenceTo()) {
objectsWithActivitiesEnabled.add(objectType);
objectNames += '\n' + objectType;
count++;
}
System.Debug('@@@' + count);
Click Execute
[image: image]
<https://user-images.githubusercontent.com/7021883/160278828-b093189e-6eb7-42ce-a683-2afaed7f579a.png>
To view the log to check the count Navigate to the tab labelled 'Logs' and
double click the log row at the very top
[image: image]
<https://user-images.githubusercontent.com/7021883/160278875-8a5d39fe-e981-46f8-a5cb-667adbcf103a.png>
This will open the execution log as shown
[image: image]
<https://user-images.githubusercontent.com/7021883/160278896-a18656df-4792-488e-aac1-d3b265eddc56.png>
To find the count we used 3 asterisks in the debug message. In the filter
text box type in 3 asterisks as shown below. The log will immediately
change to only show the row that matches our debug message.
[image: image]
<https://user-images.githubusercontent.com/7021883/160278950-3a657395-8bc4-46e2-a893-2c7e623c036a.png>
The output in my Org is *83*. It would be great to know what this number
is in the Org you're having issues with.
—
Reply to this email directly, view it on GitHub
<#177 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMDVR6CE626MIC6QVUJOCDVCA7TXANCNFSM5ROWZ3LQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi!
Thank you for the assistance
I've attached the screenshot results to this email
[image: Screen Shot 2022-03-30 at 10.14.41 AM.png][image: Screen Shot
2022-03-30 at 10.16.46 AM.png][image: Screen Shot 2022-03-30 at 10.17.23
AM.png][image: Screen Shot 2022-03-30 at 10.17.33 AM.png][image: Screen
Shot 2022-03-30 at 10.17.45 AM.png]
…On Sun, Mar 27, 2022 at 6:01 AM Dave Norris ***@***.***> wrote:
Sure.
1. Print all custom metadata type records for the parent object that
has the error
Goto Setup->Custom Metadata Types
[image: image]
<https://user-images.githubusercontent.com/7021883/160278159-33bae3f2-6cdd-4ae3-af95-db06b80e81cf.png>
Click Manage Records on Timeline_Configuration
[image: image]
<https://user-images.githubusercontent.com/7021883/160278227-4ceabb8a-fa9a-40ac-a7ce-1f2550395c7b.png>
Click Create New View
[image: image]
<https://user-images.githubusercontent.com/7021883/160278256-ec7789d4-bbbd-4c76-8db6-bd10b1078418.png>
Then Setup a view for the parent object with the error. In the example
below the parent object we are looking for is Account but substitute this
with the parent that has time warp on it when you get the error
[image: image]
<https://user-images.githubusercontent.com/7021883/160278323-1f0b948d-f9ce-4fe7-bb91-65641ff90bd2.png>
Click Save then show me the results.
Then drilldown on each active record to get the detail and take a
screenshot of each record like below
[image: image]
<https://user-images.githubusercontent.com/7021883/160278427-e31a634f-fbc5-4338-a0af-4d53b2650f97.png>
—
Reply to this email directly, view it on GitHub
<#177 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMDVR77WCCHXTH6EEU4TCDVCA52HANCNFSM5ROWZ3LQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @JaimeInfutor sadly I don't see the email attachment. You will need to directly attach to the GitHub discussion in the thread. If you prefer to email then you can use [email protected] |
Beta Was this translation helpful? Give feedback.
-
Hi @JaimeInfutor the issue for your Org is that you have 1,075 objects that can be related to a Task or Event. This means that any sub query using Tasks or Events will fail. So if you query using the format Select Id, (Select Id from Tasks) From Account Where Id = 'AnyValidAccountId' then you will get an error in this Org. Sys Admin doesn't get the issue since you have view all permissions. Assuming you can't reduce the number of objects then you'll have to inactivate Tasks and Events for all objects for now. In June we should have the ability to plot based on OpenActivities and ActivityHistory that might help you. Until then you're stuck not being able to plot Tasks or Events. We'll add some info to the documentation to point this out to others who might come across something similar. |
Beta Was this translation helpful? Give feedback.
-
Hi Dave
Thanks for clearing this up!
I'll stay tuned for your release in June and hope that helps with this
issue
Appreciate your communication here
…On Sun, Apr 3, 2022 at 6:06 PM Dave Norris ***@***.***> wrote:
Hi @JaimeInfutor <https://github.com/JaimeInfutor> the issue for your Org
is that you have 1,075 objects that can be related to a Task or Event. This
means that any sub query using Tasks or Events will fail. So if you query
using the format Select Id, (Select Id from Tasks) From Account Where Id =
'' then you will get an error in this Org. Sys Admin doesn't get the issue
since you have view all permissions.
Assuming you can't reduce the number of objects then you'll have to
inactivate Tasks and Events for all objects for now. In June we should have
the ability to plot based on OpenActivities and ActivityHistory that might
help you. Until then you're stuck not being able to plot Tasks or Events.
—
Reply to this email directly, view it on GitHub
<#177 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMDVRZQT4DG3AUCK3UE2NLVDIQA5ANCNFSM5ROWZ3LQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Jaime Rode
Salesforce Admin
*Mobile* | 414-666-8089
<https://infutor.com/>
<https://www.facebook.com/Infutor/> <https://twitter.com/infutor>
<https://www.linkedin.com/company/infutor-data-solutions>
<https://www.youtube.com/channel/UC89YwiCj0Yd5-vhrc1sZMbQ>
This email and all attachments are legally privileged, and intended solely
for the use of the individual or entity to whom they are addressed.
Unauthorized review, use, disclosure or distribution is strictly
prohibited. If you are not the intended recipient, please contact sender by
reply e-mail, and destroy all copies of original message.
Infutor Data Solutions, LLC | One Lincoln Centre 18W140 Butterfield Rd,
Ste 400, Oakbrook Terrace, IL 60181
|
Beta Was this translation helpful? Give feedback.
Hi @JaimeInfutor the issue for your Org is that you have 1,075 objects that can be related to a Task or Event. This means that any sub query using Tasks or Events will fail. So if you query using the format Select Id, (Select Id from Tasks) From Account Where Id = 'AnyValidAccountId' then you will get an error in this Org. Sys Admin doesn't get the issue since you have view all permissions.
Assuming you can't reduce the number of objects then you'll have to inactivate Tasks and Events for all objects for now. In June we should have the ability to plot based on OpenActivities and ActivityHistory that might help you.
Until then you're stuck not being able to plot Tasks or Events.
We'll add …