0

I'm getting a weird error when trying to use my workflow to send out a visualforce email template. The visualforce email template generates a PDF attachment (from VF component) and works fine when I send and test merge fields etc. So i set up a workflow based on a field update to send out this email to all related contacts of the custom object; when I tick the field and click save it doesn't allow me to save the records and throws this error:

Unable to Finish Processing Request An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting as well as any other related information. We apologize for the inconvenience. Thank you again for your patience and assistance. And thanks for using salesforce.com! Error ID: Data Not Available

I've done some troubleshooting myself and have identified the root of the problem. In my PDF attachment, I display a QR code at the bottom. when I take this out the workflow works fine. The QR code is created in a custom field (formula(TEXT)) using a free QR code API site "https://api.qrserver.com/v1/create-qr-code/?size=75x75&data="

The site is added in remote sites.

Everything has worked fine so far and the QR code hasn't had any issues displaying. It's only when I try to trigger the workflow it fails.

I've also tried using any other external image, whilst adding in the matching site in remote sites; and still get the same error.

Any suggestions?

0

I would suggest you to break down this updating fields and sending emails into two parts.

Through workflow, just update the field.

Through separate process builder, send the email. You should fire the process builder, based on field value changes.

Since, sending emails is considered as webservice callout, so committing the data and callout could not be in same transaction through workflow in single goal.

  • I have tried separating out the process as you have suggested. Workflow updates a field; based on me ticking another field. Process builder fires when this new field is updated. Same error message as before and doesn't let me even save the record – James Wargent Apr 24 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.