Contents tagged with PXDatabase
I want to share if you need to execute stored procedure in Acumatica how to achieve it.
1. Create Stored procedure in db.
2. Use in your code PXDatabase.Execute.
For example let's say you created stored procedure which has name DeletePrTranByPrPayrollAndPayrollDetailsId and takes as parameters @prPayrollRefNbr and @prPayrollDetailsID which are of type nvarchar.
Then you can call stored procedure in the following way:
var pars = new List<PXSPParameter>();
PXSPParameter p1 = new PXSPInParameter("@prPayrollRefNbr", PXDbType.NChar, details.PayrollRefNbr);
PXSPParameter p2 = new PXSPInParameter("@prPayrollDetailsID", PXDbType.NChar, details. … more