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

Developer Script Exception : Entity is not api accessible #360

Closed
thenryST opened this issue Jul 27, 2016 · 20 comments
Closed

Developer Script Exception : Entity is not api accessible #360

thenryST opened this issue Jul 27, 2016 · 20 comments

Comments

@thenryST
Copy link

I create a roll up yesterday to have the MIN of a score field on Contacts rolled up to a field on their related Account. I've received the error via email but the user ID doesn't exist in our Org. Has anyone seen this error?

Email Subject: Developer script exception from ST : dlrs_AccountTrigger : dlrs_AccountTrigger: execution of AfterUpdate caused by: System.NoAccessException: Entity is not api accessible Class.dlrs.fflib_SObjectSelector: line 36, column 1 Class.dlrs.RollupSummariesSelector.CustomObjectSelector.: line 102, column 1 Class.dlrs.RollupSummariesSelector.: line 43, column 1 Class.dlrs.RollupService.describeRollups: line 990, column 1 Class.dlrs.RollupService.handleRollups: line 673, column 1 Class.dlrs.RollupService.triggerHandler: line 307, column 1 Trigger.dlrs_AccountTrigger: line 7, column 1

Message:
Apex script unhandled trigger exception by user/organization: 0051a000001c0q9/

dlrs_AccountTrigger: execution of AfterUpdate

caused by: System.NoAccessException: Entity is not api accessible

Class.dlrs.fflib_SObjectSelector: line 36, column 1
Class.dlrs.RollupSummariesSelector.CustomObjectSelector.: line 102, column 1
Class.dlrs.RollupSummariesSelector.: line 43, column 1
Class.dlrs.RollupService.describeRollups: line 990, column 1
Class.dlrs.RollupService.handleRollups: line 673, column 1
Class.dlrs.RollupService.triggerHandler: line 307, column 1
Trigger.dlrs_AccountTrigger: line 7, column 1

@afawcett
Copy link
Collaborator

Are you in Professional Edition?

@afawcett
Copy link
Collaborator

I'll close this issue out for now, however you can still add comments and if needed we can re-open. Thanks. 👍

@jhoosemans
Copy link

I have the same error. I first installed the Tool in our Full Sanbox, with no errors. Now I have done the same in production and I get two emails a day with this error. So far I have created two RollUps that rollup Opportunity data to Account.

Good to know, we have person account activated.

@afawcett
Copy link
Collaborator

This is the error

Entity is not api accessible 

This is the code failing...

AsyncApexJob.SObjectType.getDescribe().getName()
,ApexTrigger.SObjectType.getDescribe().getName()
,ApexClass.SObjectType.getDescribe().getName()
,Attachment.SObjectType.getDescribe().getName()
,RecordType.SObjectType.getDescribe().getName() 

In this case 'Entity' is an object, some of these you will recognise like Attachment. Others maybe less so. Other than in PE edition, all these objects should exist in EE and above. So i do not quite understand the error.

I note that the latest version of the fflib_SObjectSelector class does not use the above code. Maybe this will resolve the issue. I'll mark this as a bug (and update to the latest version of this class) and we can make a speculative fix perhaps, see if this works. Since i cannot reproduce. it.

Meanwhile, can you confirm what Salesforce edition your on? Also how recent is your sandbox copy of production?

@afawcett afawcett added bug and removed discussion labels Oct 13, 2016
@afawcett afawcett changed the title Developer Script Exception Developer Script Exception : Entity is not api accessible Oct 13, 2016
@shawnholt
Copy link

receiving this error since winter 17 upgrade. using managed release (2.4.2). not sure 1) how to upgrade managed and 2) if this issues is resolved. thx

@afawcett
Copy link
Collaborator

afawcett commented Dec 4, 2016

Thanks @shawnholt , added priority tag on this one, i had not appreciated until now it was a regression caused by the platform upgrade, thanks for sharing! 👍

@StephanieKing
Copy link

Hi @afawcett , yes, this sounds like my issue. I am getting various errors from 6 Nonprofit orgs every night. All Nonprofit orgs are on Enterprise edition.

ONE ERROR EMAIL LOOKS LIKE THIS:
Apex script unhandled trigger exception by user/organization: 005j000000BvWLz/00Dj0000001pS6d
dlrs_ContactTrigger: execution of AfterUpdate

caused by: System.NoAccessException: Entity is not api accessible

Class.dlrs.fflib_SObjectSelector: line 36, column 1
Class.dlrs.RollupSummariesSelector.CustomObjectSelector.: line 102, column 1
Class.dlrs.RollupSummariesSelector.: line 43, column 1
Class.dlrs.RollupService.describeRollups: line 943, column 1
Class.dlrs.RollupService.handleRollups: line 635, column 1
Class.dlrs.RollupService.triggerHandler: line 307, column 1
Trigger.dlrs_ContactTrigger: line 7, column 1

AND THE OTHER ERROR EMAIL LOOKS LIKE THIS:
Error #2:
Error Type: Batch Apex error
Error Date: 2016-12-02 06:01:55
Message: "First error: Update failed. First exception on row 0 with id 003j000000HwBSEAA3; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, dlrs_ContactTrigger: execution of AfterUpdate
caused by: System.NoAccessException: Entity is not api accessible
Class...."
Context: npsp__RLLP_OppContactRollup_BATCH
Stack Trace:
null

Error #3:
Error Type: Batch Apex error
Error Date: 2016-12-03 06:01:17
Message: "First error: Update failed. First exception on row 0 with id 003j000000HwBSEAA3; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, dlrs_ContactTrigger: execution of AfterUpdate
caused by: System.NoAccessException: Entity is not api accessible
Class...."
Context: npsp__RLLP_OppContactRollup_BATCH
Stack Trace:
null

Error #4:
Error Type: Batch Apex error
Error Date: 2016-12-04 06:01:15
Message: "First error: Update failed. First exception on row 0 with id 003j000000HwBSEAA3; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, dlrs_ContactTrigger: execution of AfterUpdate

caused by: System.NoAccessException: Entity is not api accessible

Class...."
Context: npsp__RLLP_OppContactRollup_BATCH
Stack Trace:
null

NOTE: I have not yet been able to determine if the rollups are actually NOT WORKING, or if they are working, but just sending me these mysterious errors.
I am going to post on the HUB as well to see if someone can help from the NPSP side....

@cdcarter
Copy link
Contributor

cdcarter commented Dec 5, 2016

Asked this question of @StephanieKing in the HUB but it's probably better to keep this troubleshooting here, as I anticipate this is not NPSP related.

@stephanie King (Redpath Consulting Group, LLC) - what occurs when you execute the following block of code in Developer Console?

System.debug(AsyncApexJob.SObjectType.getDescribe().getName());
System.debug(ApexTrigger.SObjectType.getDescribe().getName());
System.debug(ApexClass.SObjectType.getDescribe().getName());
System.debug(Attachment.SObjectType.getDescribe().getName());
System.debug(RecordType.SObjectType.getDescribe().getName());

Can you upload the full debug log from that execution?

@shawnholt
Copy link

shawnholt commented Dec 6, 2016 via email

@StephanieKing
Copy link

@cdcarter --
Here is what the debug log looks like:
image

@shawnholt - I have not tried that... is there a way to tell if that is a factor, or do I just change the time and see if it helps?

@cdcarter
Copy link
Contributor

cdcarter commented Dec 6, 2016

@afawcett - is there any chance asyncapexjob is no longer API accessible from within an async job?

@StephanieKing
Copy link

Just checking in again. I am getting this error daily from multiple organizations. All of them are Enterprise orgs with the NPSP. Here is one from today, from a different org:

Apex script unhandled trigger exception by user/organization: 00512000005wJS2/00DA0000000BgL6

dlrs_OpportunityTrigger: execution of AfterInsert

caused by: System.NoAccessException: Entity is not api accessible

Class.dlrs.fflib_SObjectSelector: line 36, column 1
Class.dlrs.RollupSummariesSelector.CustomObjectSelector.: line 102, column 1
Class.dlrs.RollupSummariesSelector.: line 43, column 1
Class.dlrs.RollupService.describeRollups: line 992, column 1
Class.dlrs.RollupService.handleRollups: line 673, column 1
Class.dlrs.RollupService.triggerHandler: line 307, column 1
Trigger.dlrs_OpportunityTrigger: line 7, column 1

@afawcett
Copy link
Collaborator

afawcett commented Jan 1, 2017

Ok i have upgraded fflib_SObjectSelector which does not use the above code to detect currency mode and avoids referencing the above objects all together. Not having been able to reproduce this (its spooky that not everyone is getting it, yet its clearly on a line of code that should apply to all orgs?!?). Anyway, i'm calling this a speculative fix...

@afawcett
Copy link
Collaborator

afawcett commented Jan 4, 2017

Fixed in v2.6, we can re-open in this speculative fix does not work.

@afawcett afawcett closed this as completed Jan 4, 2017
@StephanieKing
Copy link

Thanks @afawcett I'm installing v2.6 in 5 orgs this morning, and crossing my fingers for less error messages in my inbox tomorrow! :-) I appreciate it, and will let you know!

@afawcett
Copy link
Collaborator

afawcett commented Jan 8, 2017

Same here, really hope this solves this illusive issue! 👍

@StephanieKing
Copy link

Success! No more DLRS errors! Thanks a BUSHEL for the fix!

@emilyhillis
Copy link

@afawcett @StephanieKing We're having the same issue and it sounds like we need to install v2.6. Did you have to make any changes after installing the new version? How did you install the new version? I'm looking on the App Exchange and it looks like the version out there was last release on 6/29/2016. https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009i3UpEAI

@StephanieKing
Copy link

@emilyhillis just download it right here from GitHub - on the main page just scroll down a little ways until you see the latest version with download links! https://github.com/afawcett/declarative-lookup-rollup-summaries
Right under the heading "Packaged Release History"

@afawcett
Copy link
Collaborator

@emilyhillis thats the wrong tool, that tool is commercial and is called Rollup Helper. @StephanieKing is correct, please find the latest package install link in the README file of the repo. Just click it and the platform will upgrade your current package install to the latest.

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

No branches or pull requests

7 participants