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

dlrs_OpportunityTrigger blocking insert/updates of Opportunities #768

Closed
chrisleavengood opened this issue Dec 5, 2018 · 8 comments
Closed

Comments

@chrisleavengood
Copy link

Errors when creating or updating an opportunity.

Error Message #1: "Apex trigger dlrs_OpportunityTrigger caused an unexpected exception, contact your administrator: dlrs_OpportunityTrigger: execution of AfterInsert caused by: System.SObjectException: Invalid field Account for Opportunity: (dlrs)"

Error Meesage #2: "Apex trigger dlrs_OpportunityTrigger caused an unexpected exception, contact your administrator: dlrs_OpportunityTrigger: execution of AfterInsert caused by: System.SObjectException: Invalid field RecordType for Opportunity: (dlrs)"

Both of the "invalid" fields referenced are standard fields on the Opportunity object. Please make fixing this issue a priority as we cannot create a single opportunity record in our org right now.

Thanks!

@aheber
Copy link
Contributor

aheber commented Dec 5, 2018

Can you post a screenshot of your configuration? That would make troubleshooting easier.

If I had to take a shot in the dark I'm guessing you've typed Account and RecordType where you should have typed AccountId and RecordTypeId as the base forms are Relationship fields and can't be addressed directly. Can only be used for things like Account.Name and RecordType.Name

@chrisleavengood
Copy link
Author

Which part of the configuration would you like screenshots for?

We've deactivated every Lookup Rollup Summary in our org and the problem persists, so I'm not sure what to document. Also, everything was working for us yesterday, but it looks like an update to the package was pushed to our org last night around 12:00 am CST. I'm not sure if that update could have caused anything to change.

@aheber
Copy link
Contributor

aheber commented Dec 6, 2018

I wasn't aware any updates had been pushed for the package. What version are you on?

If you could screenshot the configuration of any related rollups on the Opportunity that might be a good start. I'm not sure what would have changed in your system.

Is it possible for you to run a debug log for one of the transactions that is failing? Maybe pull the stack trace portion that is reporting all of the classes involved in the crash? (Might not work well depending on where it is in the managed package)

Nothing else in the org that could have changed in that window?

@DanDonin
Copy link
Contributor

DanDonin commented Dec 6, 2018 via email

@chrisleavengood
Copy link
Author

Yes, I mispoke on the automatic upgrade - that was for a separate package installed for a similar function. There are currently two Lookup Rollup Summaries on the Opportunity. I've attached screenshots of both.

And unfortunately, it's tough to pinpoint the error because we've had a large team deploying, loading data, etc. to get through our pre-deployment UAT phase. I'll follow-up with the rest of my team to see if any of them are aware of what else might have changed.

I appreciate you looking at the config to confirm nothing is causing issues there.

opp - total properties

opp - total purchase amount

@chrisleavengood
Copy link
Author

We got to the bottom of this one. Your initial assessment of referencing Account and RecordType instead of AccountId and RecordTypeId was spot on.

The challenge in finding which Rollup was causing this errror was due to my accessing the Lookup Rollup Summary tab directly instead of going to the "Manage Lookup Rollup Summaries tab". When accessing that tab directly, it was only my two rollup summaries that showed an association to the Opportunity object, however there was another that was scheduled to run (but showed inactive in the UI) that was actually still calculating. As soon as we updated those field references, everything started working again.

Thank you both for your help!

@aheber
Copy link
Contributor

aheber commented Dec 6, 2018

Awesome! Yeah DLRS can be a bit confusing wherein you can schedule through two different interfaces and into two different sets of rollups jobs.

Glad you got it taken care of.

@Dhruv9221
Copy link

Hey I have same problem but, not able to figure out which DLRS is causing this.

As I am new to this tool, if any one can help me it would be great help!!

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

4 participants