In 21R2 version, when trying to do Void Payment in ‘Payments and Applications’ screen from code, facing below error where as same is working fine when tried from screen.
Used below code snippet for the void action, which worked in 20R2 version.
ARPaymentEntry graph = PXGraph.CreateInstance<ARPaymentEntry>();
graph.Document.Current = payment;
if (graph.Document.Current != null && graph.Document.Current.Status != "V")
//var result = graph.VoidCheck(new PXAdapter(graph.Document));
Note: Tried with commented statement as well.
Below is the error response after executing 'graph.Actions["VoidCheck"].Press();' statement.
Please let me know if any thing missed here or any one faced this before.
Thanks in advance.