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
davidesidavidesi 

Problem inserting Events

I'm facing a very weird problem.
I have a class called from AfterInsert that take a list of inserted events , process them and after saves them.

If I insert a single record with workbench, it works fine, but if I insert for instance 11 records, I can see in the debug log that 11 records are inserted but If I try to click on one of the Ids that have been inserted, I get an error saying that that record doesn't exist.

Anybody can help with this?
 
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi davidesi,

Which is your profile ? Try with system admin .
Please check your acess to Events .

Let us know if it helps you.


 
Hargobind_SinghHargobind_Singh
I second with ashish, security settings would be the first place to check. You should also check the sharing model, whether the record would be available to you. 
Also check whether there is any exception being thrown which could cause the transaction to roll-back. 

 
davidesidavidesi
Hi Ashis, thank you for your answer.
I'm executing both cases using system administrator , and I have full access to every thing.
The fact is that is inserted only one record it works fine , and executing with the same profile - same user with multiple records it fails.