pjs.rollBack()
The pjs.rollBack() API rolls back pending changes to all files that are open under commitment control.
This is only supported with the IBM i database and not using SQL.
RPG Equivalent
ROLBK
Example
pjs.defineTable("ordheader", { write: true, commit: true }); pjs.defineTable("orddetail", { write: true, commit: true }); try { Â ordheader.write(); orddetail.write(); Â } catch (error) { Â // One of the records failed to write, rollback changes. pjs.rollBack(); Â } Â // Both records written, commit changes. pjs.commit();
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!