CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 45: Certified Platform Developer II

A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records. The CalloutUtil.makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the pro…

Nội dung câu hỏi

A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records. The CalloutUtil.makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the problem?

Minh họa câu hỏi

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. Remove the Database.setSavepoint and Database.rollback.
  2. B. Change the CalloutUtil.makeRestCallout to an @InvocableMethod method.
  3. C. Change the CalloutUtil.makeRestCallout to an @future method. — đáp án hiện tại
  4. D. Move the CalloutUtil.makeRestCallout method call below the catch block.

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề