on 2016 Jan 29 5:41 PM
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
Request clarification before answering.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.