+ Start a Discussion
Ganesh HegdeGanesh Hegde 

Invoke Apex class from workflow update

Hi All,

I need to create a PDF and attach to the case when case is not updated for 10 days. Is there any way to achieve this without using triggers?

I can not use trigger because my PDF will contain images and the methods Blob.toPdf() and getContentAsPdf() are not supported by triggers if PDF contains image. Hence I need to do something similar to field updates and then invoke apex class without using trigger

Can somebody please suggest how can I invoke apex class or VF page based on filed update?

Thanks. Have a nice day!
Saikishore Reddy AengareddySaikishore Reddy Aengareddy
In this use case you can write a Batch apex and schedule it to run daily and check on cases which were not being udpated in the last 10 days and from batch apex you can invoke your apex class which performs pdf creation. 

As per my understanding this cannot be solved by trigger as triggers are event based and instant. 
Ganesh HegdeGanesh Hegde
Hi Saikishore,

I have tried batch apex and inbound email services however both are generating blank pdf as getContentAsPdf() method is not supported in Batch apex and email services.

I can not use Blob.toPDF() because it will not parse the images. I want to add an image to pdf.

Suggestions are highly appreciated

Ganesh HegdeGanesh Hegde
This can be done through process builder