Hi,
I am trying to catch an exception in custom code I wrote in extension class of SalesPackingSlipJournalPost.endPost(), I am calling base endPost method first using CoC and trying to generate a custom report at the end of the posting , the issue is that if an error/exception occur in generating/printing of custom report the packing slip posting fails which I don't want to happen, The packing slip posting should not fail if for some reason there is an error/exception in printing custom SSRS report. In this situation I want to catch the exception and display an infolog saying the packing slip is posted but the generation/printing of custom report failed due to xyz reason.
my code look something like this.
public void endPost()
{
next endPost()
try
{
//My code that involve writing to some tables and calling controller class of a SSRS report; some times i get an exception in
meunFunciton.run(args) in one of my custom methods.
}
catch
{
//Display Infolog about error
}
}
I am not able to achieve my desired outcome, when the exception occurs system display it in UI and the posting of packing slip is cancelled.