RE: Receipt Printing for Suspended Transactions Through Default Receipt Printing Utility In POS Dynamics AX
Hi Oksana Kovaliova ,
I am trying to do same thing in suspend trigger but facing error of null reference in obj Transaction object ,can you check what is wrong in this code and also mention what should I pass in IRounding parameter ,currently I am passing null.
Your quick response is highly appreciated .
public void PostSuspendTransaction(IPosTransaction posTransaction)
{
LSRetailPosis.ApplicationLog.Log("SuspendTriggers.PostSuspendTransaction", "After the suspension of a transaction...", LSRetailPosis.LogTraceLevel.Trace);
SuspendRetrieveData test =null;
RetailTransaction obj;
//SqlConnection conn =this.Application.Settings.Database.Connection;
SqlConnection conn = new SqlConnection();
conn.ConnectionString =
"Data Source=DEVSRVR;" +
"Initial Catalog=MTH01;" +
"Integrated Security=SSPI;";
obj = test.GetSuspendedTransaction(conn, posTransaction.TransactionId, null, posTransaction.StoreId, "PKR", true);
}