I have a data maintenance batch job that is running object script to fire a create record trigger.
When the batch is run, I am getting an error stating the current user and API user do not have persmission to access this object.
However, my Query API has view/create permission on the advance object as well as the object that is being created from the trigger (Daily Calculations).
What am I missing?
Hello,
Can you try running the batch job manually? It should run fine if you already enabled the Query API permission for the data maintenance object, the object that holds the create record trigger and also the object that is being created from the trigger.
Thank you,
Gian
Yes, I can run the batch manually and it works fine. It just doesn't work if I let the scheduler run it.
Hello,
Can you try adding a Query API permission to the User object?
Thank you,
Gian
Hi Gian,
i tried to add view permission to the user object, but I received the same error message.
Hello,
Can you post the code in the batch job as well as the trigger code? Did you add the edit permission for the User Query API as well? I believe Query API permissions are the only permission needed for the scheduled batch job run. A server restart might help to identify if it is just cached. I'm doing a test as well to see if I can replicate the issue.
Thank you,
Gian
Hello,
Sorry about the confusion. The edit permissions must be checked for the runTrigger API to run. "This API requires EDIT permission on the object record." Please see the runTrigger method usage in the Rollbase User Guide.
Let me know if this works,
Thank you,
Gian
That did it, thanks Gian!