Skip to content
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

RollupJob vs calculate errors #30

Closed
wes1278 opened this issue Apr 22, 2014 · 7 comments
Closed

RollupJob vs calculate errors #30

wes1278 opened this issue Apr 22, 2014 · 7 comments
Assignees
Labels

Comments

@wes1278
Copy link
Contributor

wes1278 commented Apr 22, 2014

Andrew,

We're running into a weird error with some scheduled jobs. This is on the financial force object model. We're trying to rollup parent milestones to phases and then phases to projects. When we run the RollupJob, we get an error that says :"Invalid Id for pse__Project_Phase__c"; However, when we run the RollupCalculateJob, it seems to work without any issues.

Any idea what might be going on?

Some other background info:

  • We tried to have these all as realtime, but it says we were causing too many rollups or something related to the # of objects in the chain. Due to having timecard rollup to child milestone, rollup to parent milestone, rollup to phase, rollup to project. So, we tried to break out the last 2 levels into scheduled jobs.
  • Clicking the calculate button seems to work.
@afawcett
Copy link
Collaborator

This is the Stack Trace I'm getting for this exception, it's from the job as well, are you seeing any failures when you look at Apex Jobs at your end...

Apex script unhandled exception by user/organization:

Failed to process batch for class 'dlrs.RollupJob' for job id '707a0000012LuaS'

caused by: System.SObjectException: Invalid Id for pse__Project_Phase__c

Class.dlrs.LREngine.rollUp: line 78, column 1
Class.dlrs.RollupService.processScheduleItems: line 282, column 1
Class.dlrs.RollupJob.execute: line 48, column 1

@afawcett
Copy link
Collaborator

Sorry I see what you mean, this only occurs in the RollupJob (the scheduled job) and not the RollupCalculateJob got it. I've not got a lot of time this weekend, well not any actually to focus on this, sorry, but hopefully the stack trace helps. Other thing, would be to deploy unmanaged into the sandbox (via the Deploy To Salesforce link) to reproduce and debug further that way. You can then call the RollupService.processScheduleItems directly from execute annonymous as well, make it easier.

@dnakov
Copy link

dnakov commented Apr 25, 2014

@afawcett Thanks. I'll try to figure it out. I was just going to call RollupCalculateJob from a batch job, but unfortunately it's not global. Probably going to end up in the pull request.

@afawcett
Copy link
Collaborator

afawcett commented May 1, 2014

Have you been able to make any progress on this? Do you want me to try and take a look, i may have some time next week if so.

@dnakov
Copy link

dnakov commented May 2, 2014

@afawcett I ended up creating a crappy little batch job that works off the LookupRollupSummary object using group by's. Had to move on to other things like usual. https://gist.github.com/dnakov/404afc2ced4f6683bc7f

@afawcett
Copy link
Collaborator

afawcett commented May 2, 2014

Ok @dnakov no worries i understand, thanks for sharing your workaround though! 👍

@afawcett afawcett closed this as completed May 2, 2014
@afawcett
Copy link
Collaborator

afawcett commented Jul 4, 2015

FYI, i have now got a handle on this error here, fixing it now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants