function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swagato RaySwagato Ray 

Entity is not org-accessible

I am new in the salesforce. When I try to write a trigger in a Developer Console,

 

It's giving me an error like below

 

Entity is not org-accessible

 

 

My trigger is as below

trigger MyFirstTrigger on Invoice__c (before update) {

}

digamber.prasaddigamber.prasad

Hi, 

 

You cann't write trigger in developer console. The whole purpose of developer console is to try to run just a part of code snippet to make sure if it's working fine or not. You can try to run body of trigger. If you need to test trigger, simply create trigger and after your testing, you can always delete it.

 

Let me know if you have any question about above.

 

Happy to help you!

Satish_SFDCSatish_SFDC
Well you can write a Trigger in the Developer Console.

And your trigger code.
Is that the complete code.

This error message has multiple reasons. In the Trigger, did you click on File > New > Trigger...... and then wrote the trigger.

Can you post the complete trigger code.

Regards,
Satish Kumar
digamber.prasaddigamber.prasad

My mistake, I thought Swagato Ray was talking about 'execute anonymous'.

 

Thanks for correction.

Swagato RaySwagato Ray

yes I did those steps and code I wrote for that trigger is as follows

 

trigger MyFirstTrigger on Invoice__c (before update) {

 

}

 

because I am new to this SFDC so, I have only tried to write this code and try to excute. But it is showing error in the problem pane.

One more thing "Invoice__c " object is present in the my developer console..

 

 

Satish_SFDCSatish_SFDC
Well then, can you check if the Object name 'Invoice__c' is correct.
Do you have access to the object.
Are you using the System Administrator profile, or any profile with the Author Apex permission enabled.

Regards,
Satish Kumar