0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Apex バッチでのエラー

Last updated at Posted at 2023-02-05

System unexpectedexception Error processing messages

image.png

原因はStartメソッドの中のSOQL文
List ContentDocumentList = [SELECT id from Contentdocument];
がガバナ制限に引っかかっているみたいでしたので、こちらをDatabase.getQueryLocator
で取得することで無事解決いたしました。

その他

バッチは非同期で実行されます。これは、VF ページから呼び出したメソッドと同じトランザクションの一部ではありません。私が考えられる唯一の方法は、ユーザーがそのページで待機している場合、バッチ ステータスを照会し、ユーザーが確認できるようにページを更新し続けることです。このオブジェクトを使用できます - https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_asyncapexjob.htm

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?