...
PaymentHistoryLine.SETCURRENTKEY("Our Bank",Status,"Run No.",Order,Date);
PaymentHistoryLine.SETRANGE("Our Bank","Payment History"."Our Bank");
PaymentHistoryLine.SETRANGE("Run No.","Payment History"."Run No.");
//VSTF287570.Begin
//AddElement(XMLNodeCurr,'NbOfTxs',FORMAT(PaymentHistoryLine.COUNT,15,9),'', XMLNewChild);
...
...
PaymentHistoryLine.SETCURRENTKEY("Our Bank",Status,"Run No.",Order,Date);
PaymentHistoryLine.SETRANGE("Our Bank","Payment History"."Our Bank");
PaymentHistoryLine.SETRANGE("Run No.","Payment History"."Run No.");
// Add the following lines.
PaymentHistoryLine.SETFILTER(Status,'%1|%2|%3',
PaymentHistoryLine.Status::New,
PaymentHistoryLine.Status::Transmitted,
PaymentHistoryLine.Status::"Request for Cancellation");
// End of the lines.
//VSTF287570.Begin
//AddElement(XMLNodeCurr,'NbOfTxs',FORMAT(PaymentHistoryLine.COUNT,15,9),'', XMLNewChild);
...