Hi yisroel,
i assume that you case is to send the invoice as pdf via mail to someone.
For this case there are 2 possible solutions:
1) On each form that you want to have this feature you have to catch the event after document save with the code below...
if (BusinessObjectInfo.EventType == BoEventTypes.et_FORM_DATA_ADD && BusinessObjectInfo.BeforeAction == false && BusinessObjectInfo.ActionSuccess == true)
{
//Do Print to PDF
}
2) The second way (better for me) is to create to create an addon (or even better a windows service) for this job.
- Addon way
- The addon will find the unprinted documents and with a batch proccess will do the export (it requires user action)
- Windows service
- The application will run always an will check for new documents. For each new document that will be stored to DB, will fire the proccess of document printing (and any other action that you want (such as mail etc))
Best Regards,
Evanggelos D. Plagianos