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

Null object error - Aggregating null currency field on child #107

Closed
wes1278 opened this issue Jan 15, 2015 · 4 comments
Closed

Null object error - Aggregating null currency field on child #107

wes1278 opened this issue Jan 15, 2015 · 4 comments
Labels

Comments

@wes1278
Copy link
Contributor

wes1278 commented Jan 15, 2015

I just ran into an error with this package where I was trying to save an OpportunityProduct on an Opportunity and gave me an apex exception. Several of the fields in question didn't have a default value of 0; changing those fields to have a default value of 0 fixed the issue.

@afawcett
Copy link
Collaborator

Thanks for sharing. Can you provide some more details so i can try to reproduce this please? Such as a screenshot of your rollup definition, opp and opp product record config, example of the error your getting. Thanks.

@wes1278
Copy link
Contributor Author

wes1278 commented Feb 5, 2015

to Repro:

  1. Create a currency field on OppLineItem
    • Very important that you do NOT set the default value to 0. Let the default be null.
  2. Create an active rollup summary record to roll that field on OppLineItem to opportunity based on OpportunityId.

Edit the data on an OpportunityLineItem (but don't change the value we're trying to rollup) to cause it try to rollup and it dies for me. I'm trying to dig up the error text from email (which I haven't been able to find in the last 15 minutes) but it was an "Attempt to de-reference a null".

To fix the issue, I went to the field and made sure the default was set to 0. Then, I went and updated the same OppLineItem record to have a value of 0 instead of null and voila, no apex exception anymore.

Just out of curiousity, do you think it would be benficial for you and I to perhaps use a shared dev org to reproduce issues like this?

@afawcett
Copy link
Collaborator

afawcett commented Feb 7, 2015

👍 for shared repo org, i can create you a user in my test org if you want, do i have your email or do you have mine?

And thanks for this repo, spookly i think another use hit this yesterday, thanks for this, i think i can find the bug from here.

@afawcett afawcett added the bug label Feb 7, 2015
@afawcett afawcett changed the title Null object error Null object error - Aggregating null currency field on child Feb 7, 2015
@afawcett
Copy link
Collaborator

afawcett commented Feb 7, 2015

Fixed in v1.17

@afawcett afawcett closed this as completed Feb 7, 2015
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

2 participants