For RC Orders in Sales order Screen, Basically when we bring the values from “Invoice Filter” Action it brings inventory items with invoice Nbrs in SOLine. And it Sometimes displays errror message on Qty feild “The return quantity exceeds the quantity available for return for the related invoice line AR010261, FOODCHIP36. Decrease the quantity in the current line, or in the corresponding line of another return document or documents AR010308, AR010316 that exist for the invoice line”, i Have also created another Action button in the grid,that works excatly like invoice filter action, i can bring the inventory items with invoice id to the SOLine grid, But i cannot display the error message that is being displayed with “Add Invoice Action” , Upon doing some R&D, i came to know that the error message is being displayed from “MemoCheck()” Methrod of “SOOrderItemAvailabilityExtension” graph, Hear is the sample code
public virtual bool MemoCheck(SOLine line, bool persisting)
if (line.Operation == SOOperation.Issue)
var result = MemoCheckQty(line);
if (result.Success != true)
var documents = result.ReturnRecords?
.Select(x => x.DocumentNbr)
.Where(nbr => nbr != line.OrderNbr);
RaiseErrorOn<SOLine.orderQty>(persisting, line, Messages.InvoiceCheck_DecreaseQty,
documents == null ? string.Empty : string.Join(", ", documents));
But iam not understanding how to implement this code into my Graph, Is there any Way how to implement this Methord()?
Best answer by AtiqView original