cancel
Showing results for 
Search instead for 
Did you mean: 

How to display application exception message on the parent document field?

Former Member
0 Kudos
123

Hi Experts,

We have a validation on Contract Document phase change event - if the phase is advanced to "Supplier Draft" then there should be a supplier contact selected in the parent Master Agreement. I have added the following code in Contract Document -> Pre Phase change script and it shows the error message as expected. But when we navigate back to the parent MA, the error is no longer shown. How can I highlight the supplier contact field in the parent MA and display the error there as well?

This is the code snippet from Contract Document Pre-phase change script:

//Validate that supplier contact is selected before moving to supplier draft phase

supplierPhase = "Supplier Draft";

if (other_phase.equals(supplierPhase)) {

    if (!hasValue(agreementObj.getContactRef())) {

        ae = agreementObj.createApplicationException("BUYER_CONTACT", bundle, errorid_supplier_contact_missing);

        throw ae;

    }

    return;

}


I tried setting the redirection override values as well:

ae.setPageRedirectionOverride(PageRedirectionConstantsIfc.REDIRECT_TO_PREVIOUS_PAGE);

I tried with all 4 constant values of page redirection, nothing seems to work.. the error message is lost as soon as we navigate back to the master agreement. I got the name "BUYER_CONTACT" from the RG UI field values for master agreement, so why is it not highlighting that field? What is the mistake here? please help

Thanks,

Gayathri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The issue is resolved.. the UI field name was "CONTACT" not "BUYER_CONTACT" after changing this in code, the correct field in parent MA also got highlighted for the error!

Answers (0)