cancel
Showing results for 
Search instead for 
Did you mean: 

Export PO to PDF and roll back

Former Member
0 Kudos

Dear all,

I need to write an add-on that will auto generate all POs to PDF format that the user input during the day. Is there a method in the SDK thall allows me to print PO layout to PDF?

Also in my add-on we'll try to update some UDFs by batch. We'd like to simulate the update before proceeding. Is there any code sample that allows rollback if any one record fails to update?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your reply. Do you have any code samples to export the PO to PDF using SDK? I tried checking the DI documentation but can't seem to find the related method.

Thanks in advance!!

Former Member
0 Kudos

Dear Alan,

So you have 2 ways:

Install a CuteWriter PDF printer (Free) and print the PO-s into it when document is added or once a day using document printing wizard.

Also possible to write a custom code by SDK which exports the PO into PDF after it added (opens is again and Actives menu id export to PDF).

By the way i am suggesting to use 1ts method, because it is more comfortable and not requites any additional development.

You can use the starttarnsaction method of company object. it is rolls back automatically when an error occurs during the transaction. to check that you are in still a transaction use the InTransaction property

Usage

statr the transaction
oCompany.StartTransaction()

'Check you are in still transaction
 If (oCompany.InTransaction) Then 
 end if
' Commit a transactions
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)

'rollback a transaction
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Rollback)

Regards

János