-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to count # of events and tasks an owner has completed; OwnerId relationship field is failing #140
Comments
Yes i've been seeing these type of errors come through from time to time as the platform emails me unhandled exceptions. I've had a few looks through the code to reverse engineer what might be the issue without success. So don't take this the wrong way, but i'm really pleased you seemed to have reproduced the issue and contact me! 👍 Next up is how to reproduce it in my environment! Its good that you seem to be using all standard objects, so i should be able to setup the rollups as you have done. I do wonder if there is some data sensitive element to it though, but lets see. So next step, can you give me a screenshot of all 4 rollup summaries please? |
Oh and also can you share some examples of the errors in the lookup logs as well please. |
Here are the 4 rollups (one of them is on "developer" mode as we were experimenting with it, but they all are normally ran as scheduled): In the logs there are a bunch of error logs, however they are all identical: All of the logs are for the Account object as the parent. Under the apex jobs list the error shows "First error: Invalid Id for User" |
I'm getting a sense of whats causing this now, i think it has to do with the OwnerId being able to point to different types of objects, not sure if this is possible for Event to have different parents though. Also i think another possible bug is the parent object may have been changed on the rollup, yet scheduled item records might still exist in the system for when the rollup records may have pointed to different parent objects. Are you able to clear the schedule item records from the system and see if you get this error again? |
This is a duplicate of this issue 185. Which is now fixed in the GitHub master branch and will be packaged shortly. |
We are trying to count the monthly number of completed tasks and events for each sales rep. Right now we have 4 lookup roll-up summaries running to calculate these numbers. For each of these, the parent field is always User and the child is either Task or Event depending on which it is counting.
When I calculate these rollups manually there are no issues; however when scheduled to run at night with the other rollups in our org the jobs fail. The OwnerId relationship field seems to be the issue and for many of the jobs it is trying to use a Contact, Lead, or Account as the OwnerId along with the User. The Apex jobs lists the error as "First error: Invalid Id for User". In the lookup logs there are a ton of errors listed for all the Accounts, Contacts, and Leads the rollup tried to use as the parent object. Here is an image of one of our rollups so you can see how we set it up:
Any ideas on what's going on? Thanks!
The text was updated successfully, but these errors were encountered: