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 Pointer Exception #14

Closed
wes1278 opened this issue Feb 24, 2014 · 7 comments
Closed

Null Pointer Exception #14

wes1278 opened this issue Feb 24, 2014 · 7 comments

Comments

@wes1278
Copy link
Contributor

wes1278 commented Feb 24, 2014

Hey Andrew,

First, this is an awesome tool!! Thanks so much for putting time into this. I'm running into a null pointer exception that I can't seem to get around. Here is the anticlimactic error message:

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Apex trigger dlrs_Rep_CodeTrigger caused an unexpected exception, contact your administrator: dlrs_Rep_CodeTrigger: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: (dlrs)".

Quick object description:
Account
Contact | Team__c (is master-detail to Account)
Rep_Code__c (has a lookup to Contact, and a lookup to Team__c object)
Asset__c (is master-detail to rep_code__c object)

There is a rollup summary from asset__c to Rep_code__c to sum a currency field on asset__c. Then there is a workflow field update on rep_code__c to copy data from the RUS to a normal currency field called AUM__c on the Rep_Code__c object. Then I have 2 records in your dlrs__LookupRollupSummary__c object to rollup the AUM__c field on Rep_Code__c to the contact or team records (based on a type__c field).
Here are those records:
image

I read a few of your other issues on here and some people said they had issues with the relationship criteria; Ideally, I'd like to have "Type__c='Team'" in the rollup summary detail but it errors with or without it.

Any ideas on what is going on here? It works for the contacts, but not for the team records.

I have a dev sandbox you can use to repro this is if you want access, just let me know.

Thanks!
-Wes

@afawcett
Copy link
Collaborator

Ok, I've found your Developer Edition org under my Subscriber Support tab, it would be great if you enabled Support Access and provide some steps to recreate. I should be able to get a complete stack dump from the error above and narrow down the line of code causing the issue.

@wes1278
Copy link
Contributor Author

wes1278 commented Feb 26, 2014

Hey Andrew,

I've granted you as lengthy an access period as I could. To reproduce, go and find an Asset__c record (not the standard sfdc object) and change the value. You'll get the exception.

Then, you can inactivate the "Rollup AUM for Teams" lookup rollup summary detail record and try your same operation over again, it will work.

Thanks!

BTW, I was curious if you were interested in having a nice front-end page that does get describes n such for creating these records instead of solely relying on the triggers you've got in place. That's something I'd be interested in contributing if you find value.

@afawcett
Copy link
Collaborator

afawcett commented Mar 1, 2014

Thanks, will take a look over the weekend.

@afawcett
Copy link
Collaborator

afawcett commented Mar 1, 2014

Oh and yes, absolutely see value in a front-end page! Your more than welcome to collaborate on this, thats why its open source. Do you want me to add you as a collaborator on the project or work in your own fork and issue a pull request when your done? Either works for me, let me know and thanks again! 👍

@wes1278
Copy link
Contributor Author

wes1278 commented Mar 1, 2014

I'll fork it. :) Thanks for offering to look into that exception.

@afawcett
Copy link
Collaborator

afawcett commented Mar 5, 2014

Thanks for the access, i reproduced it in a test and fixed it, see the Readme for the Install URL for v1.7 of the package.

@afawcett afawcett closed this as completed Mar 5, 2014
@wes1278
Copy link
Contributor Author

wes1278 commented Mar 6, 2014

THANKS!!!! works like a charm! :)

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

No branches or pull requests

2 participants